Forgot your password? Click here.
Static is a keyword that can be used to declare a any data member, member function and class as Static form and it can be also used with a class, field, method, property, operator, event or constructor. The main purpose Static keyword it used for create the instance at class compile time not object time. All the Static fields are directly accessed in the class memory without need the object of class. A Static member of a class can be used to keep track of the instances created and maintain common data to be shared among all instances. It can be used in helper and utility classes, which usually contain generic methods that contain abstractions of pure logic. A Static constructor is used to make entries in log files, as well as in wrapper class to load the dynamic link libraries (DLLs) required to execute unmanaged code.