Skip to main content

Timeline for Hidden Features of C#?

Current License: CC BY-SA 2.5

12 events
when toggle format what by license comment
Jan 10, 2011 at 4:24 comment added Ergwun FxCop doesn't like static constructors for performace reasons. K. Scott Allen's blog post throws some light on why: odetocode.com/blogs/scott/archive/2004/09/15/…
May 27, 2010 at 13:31 comment added chapluck &quotStatic constructors are also useful when creating wrapper classes for unmanaged code&quot, how about static destructor for unmanaged code? ;)
May 19, 2010 at 14:52 history edited Peter Mortensen CC BY-SA 2.5
Quoted inline types. Minor edit: grammar/spelling/case/punctuation/etc.
Jun 15, 2009 at 2:08 comment added P Daddy @nils_gate: No, that's a nasty mistake. You probably think this because MSDN docs often say "static members of SoAndSo class are thread safe." This is not because they're intrinsically thread safe. Quite the opposite, in fact. Since any thread can access static members without even having to share an object reference, then static members are more likely to find themselves in a race condition, which is why Microsoft has taken the trouble to make most of their static members thread safe.
Mar 27, 2009 at 6:35 comment added core Okay, I completely removed the example and made everything more clear (I hope!).
Mar 27, 2009 at 6:34 history edited core CC BY-SA 2.5
added 906 characters in body
Mar 27, 2009 at 6:02 comment added core Actually there was an internal web service that also could be used to change the value of connectionString too. So the lock was needed, no? I didn't remove the lock because I just copied the code and then added the comment.
Mar 25, 2009 at 12:34 comment added NileshChauhan No need to lock as all the static members are thread safe.
Sep 19, 2008 at 8:12 history edited core CC BY-SA 2.5
added 151 characters in body
Sep 19, 2008 at 7:55 history edited core CC BY-SA 2.5
added 171 characters in body
Sep 19, 2008 at 7:48 history answered core CC BY-SA 2.5
Sep 19, 2008 at 7:48 history made wiki Post Made Community Wiki by CommunityBot