最佳答案
Going from Java
to C#
I have the following question:
In java I could do the following:
public class Application {
static int attribute;
static {
attribute = 5;
}
// ... rest of code
}
I know I can initialize this from the constructor but this does not fit my needs (I want to initialize and call some utility functions without create the object). Does C# support this? If yes, how can I get this done?
Thanks in advance,