I have a static Hashtable variable in a class that I would like to populate prior to any instance of the class being created. However, it seems like the earliest point at which I can populate the Hashtable is within the constructor.
I know Java allows a static code block...
...which allows for static code to occur prior to any object being created from the class. Is something like this possible in C#?? If not, does anyone have any suggestions on how to work around this?
I know Java allows a static code block...
Code:
static {
// code here
}
...which allows for static code to occur prior to any object being created from the class. Is something like this possible in C#?? If not, does anyone have any suggestions on how to work around this?