Monday 16 December 2013

What things you have to remember while dealing with Static Constructor?

1. Static constructor never have any access specifier.

 class demo
    {
        public  static demo() // error
      {
      }
    }
2. You never decided when static constructor is called. but one thing you sure that static function is called before the firth call to any member of class. 

No comments:

Post a Comment