Monday, March 24, 2008

.Net Framework has ThreadSafety in Static Variable Initialization

Its a great thing to know about some facts that reduce your coding time .Net Framework JIT compiler only initializes the static variable only when any method uses it. Static field is instantiated with a thread safe. .Net Framework cares all about it. You dont have to add Thread Safe code for initializing static property.

For example : http://msdn2.microsoft.com/en-us/library/ms954629.aspx

No comments: