¡@

Home 

c# Programming Glossary: o2

Difference between .ToString and “as string” in C#

http://stackoverflow.com/questions/2099900/difference-between-tostring-and-as-string-in-c-sharp

of the type of the object. object o1 somestring object o2 1 string s o1 as string returns somestring string s o2 as string.. o2 1 string s o1 as string returns somestring string s o2 as string returns null string s o2.ToString returns 1 Another.. somestring string s o2 as string returns null string s o2.ToString returns 1 Another important thing to keep in mind is..

Why do we need boxing and unboxing in C#?

http://stackoverflow.com/questions/2111857/why-do-we-need-boxing-and-unboxing-in-c

double e 2.718281828459045 double d e object o1 d object o2 e Console.WriteLine d e Console.WriteLine o1 o2 Think about.. d object o2 e Console.WriteLine d e Console.WriteLine o1 o2 Think about it for a second before going on to the next sentence... more subtle double e 2.718281828459045 object o1 e object o2 e Console.WriteLine o1 o2 will also print False Better to say..

Does the .NET garbage collector perform predictive analysis of code?

http://stackoverflow.com/questions/3161119/does-the-net-garbage-collector-perform-predictive-analysis-of-code

this code static void TestGC object o1 new Object object o2 new Object WeakReference w1 new WeakReference o1 WeakReference.. w1 new WeakReference o1 WeakReference w2 new WeakReference o2 GC.Collect Console.WriteLine o1 is alive 0 w1.IsAlive Console.WriteLine.. o1 is alive 0 w1.IsAlive Console.WriteLine o2 is alive 0 w2.IsAlive Since o1 and o2 are still in scope when..

? (nullable) operator in C#

http://stackoverflow.com/questions/3183818/nullable-operator-in-c-sharp

you have code like this int x 5 int y 5 object o1 x object o2 y The boxed values referred to by o1 and o2 are indistinguishable... o1 x object o2 y The boxed values referred to by o1 and o2 are indistinguishable. You can't tell that one is the result..

C# .Equals(), .ReferenceEquals() and == operator

http://stackoverflow.com/questions/3869601/c-sharp-equals-referenceequals-and-operator

either. To illustrate object o1 null object o2 new object Technically these should read object.ReferenceEquals.. redundant. ReferenceEquals o1 o1 true ReferenceEquals o1 o2 false ReferenceEquals o2 o1 false ReferenceEquals o2 o2 true.. o1 o1 true ReferenceEquals o1 o2 false ReferenceEquals o2 o1 false ReferenceEquals o2 o2 true o1.Equals o1 NullReferenceException..

Looking for a fast and easy way to coalesce all properties on a POCO

http://stackoverflow.com/questions/7422861/looking-for-a-fast-and-easy-way-to-coalesce-all-properties-on-a-poco

fields. Some illustrative code POCO o1 LoadFields1To3 POCO o2 LoadFields4To5 POCO o3 LoadFields6To9 ... etc ... We're in this.. properties. Something like POCO final o1.UnionProperties o2 .UnionProperties o3 and so on I am able to guarantee that no..