Last post Mar 16, 2017 09:06 AM by Cathy Zou
Mar 15, 2017 08:08 PM|Khan_1|LINK
Suppose I have a static field , in a normal class(not static) then the static field required the static constructor mandatory or it will not necessary for compilation.
Mar 15, 2017 08:24 PM|kaushalparik27|LINK
When static constructor is not defined in class, static fields are initialized just before their use (In fact, static constructors considered to be slow). Here are some points related:
Mar 16, 2017 01:43 AM|PaulTheSmith|LINK
Why do you ask? Create a class, add a static field. Does it compile?
Mar 16, 2017 09:06 AM|Cathy Zou|LINK
Static field does not required static constructor.
Besides, as far as I kknow. A static class is basically the same as a non-static class, but there is one difference: a static class cannot be instantiated.