TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Matt Huggins
NA
1
0
Static Code Blocks?
Apr 1 2006 7:27 PM
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...
static { // code here }
...this 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?
Reply
Answers (
1
)
Data acquisition, spell checker, GUI
PDA apllication