static constructor in c# code example
Example 1: static c#
(static) >> means that the method belongs to the Program class
and not an 'object' of the Program class.
Example 2: static class constructor c#
class SimpleClass
{
// Static variable that must be initialized at run time.
static readonly long baseline;
// Static constructor is called at most one time, before any
// instance constructor is invoked or member is accessed.
static SimpleClass()
{
baseline = DateTime.Now.Ticks;
}
}