Cheers ;) that makes things clearer for me.
Shayne Husson
Posts
-
Is New() inherently threadsafe? -
Is New() inherently threadsafe?I am trying to get an understanding about making classes thread-safe. Since the constructor is called just once for each instance of a class, does it follow that no other consideration needs to be given to ensure the constructor is thread-safe? Thanks for any help
-
Methodology for Switch based on an objectI am learning C#, coming from VB.NET I would like to know what method is commonly used to make a decision based on the contents of an object. For something like: if ( obj is MyType1 ) ... else if ( obj is MyType2 ) ... else if ( obj is MyType3 ) ... could be quite lengthy. Naively: switch( obj ) { case MyType1: ... Case MyType2: ... Case MyType3: ... } This, I realise is incorrect because switch only accepts integral types or strings. Is there another way of doing it? Any help appreciated, Shayne
-
Ideal workspace / office for developersWhat is a "foosball table" ?? Thanks, Shayne