Static Constructor
I was asked this item in a job interview. So write here to note ourself.
Static Constructor can be also called as Class constuctor. Its usage is initial static field.
following is the limit of Static constructor :
1.just static field can be invoke in this function;
2.it just can be called only once;(at the first object of the class initialed)
3.it can't have any parameters;
4.it must be a private function;
5.it can't invoke any other constructors.
When and where should it be used?
posted on 2009-05-20 21:56 gyhanonline 阅读(208) 评论(0) 编辑 收藏 举报