Archive for the 'C#' Category


Scope Warts

“Scope Warts” is a pretty catchy way of decribing the same way that I encode the scope of a variable in its name.

Generally, I would prefix a class variable with the, e.g. theLogger, an instance level variable with my, e.g. myAccount, and a method or lower level variable with tmp.

Works well, and even though there is IDE support for reporting errors on variable hiding in Java IDEs, its a good practice to get into, since we’re not always coding in an IDE, particularly with scripting languages.