C Literal Number Grammar

Recently I was investigating a bug and ended up investigating the possible values of C++ literals for char and number types. The following page has a very useful and detailed grammar of C/C++ literals that came in handy.

Testing Your Code

This is a little off topic from my typical purely technical discussion.

C Keyword Identifiers

This falls into the “learn something new everyday but not necessarily entirely useful bucket”. An app I spend a bit of time on leverages the CodeDom heavily to spit out managed code. While running through some test cases the other day I noticed that it was prefixing many identifier names with the @ symbol when the generated code was C#.

Singleton Pattern

Quite awhile back I posted about how to create a re-usable singleton pattern in .Net. Link is here. A bit of time has passed and I’ve altered the pattern a bit. The reasons for the change are some new type inference patterns and FxCop cleanliness.

Debuggernonusercode And Properties

DebuggerNonUserCode is an attribute that tells the debugger that the target item is not code typed by the user. It can be added to classes, structs, methods, constructors and properties.