I am working on some custom authentication code based on Microsoft stuff. Studying Profile functionality, I looked at the ProfileBase class found in System.Web.dll v4.0.30319. There are several class level variables that are declared as a type, but then initialized to a null value, which is passed to that type.
For example,
private static Exception s_InitializeException = (Exception) null; private static ProfileBase s_SingletonInstance = (ProfileBase) null; private static Hashtable s_PropertiesForCompilation = (Hashtable) null;
I usually do not initialize variables with a class level scope. I am wondering if this is what I should do or what purpose it fulfills.
Thanks for any enlightenment.
c #
Jeff reddy
source share