¡@

Home 

c# Programming Glossary: unboxing

Why can't I unbox an int as a decimal?

http://stackoverflow.com/questions/1085097/why-cant-i-unbox-an-int-as-a-decimal

Is there something subtle I'm missing c# decimal int unboxing share improve this question You can only unbox a value type.. different IL instructions Boxing box IL instruction and unboxing unbox IL instruction Casting through the inhertiance hierarchy..

.NET HashTable Vs Dictionary - Can the Dictionary be as fast?

http://stackoverflow.com/questions/1089132/net-hashtable-vs-dictionary-can-the-dictionary-be-as-fast

which I totally agree with which leads the boxing and unboxing advantage for a slight performance gain. But I have also read.. guarantee preserving the order of items. Leaving boxing unboxing issues aside most of the time they should have very similar..

Do C# Generics Have a Performance Benefit?

http://stackoverflow.com/questions/116988/do-c-sharp-generics-have-a-performance-benefit

benefit to using generics you do away with boxing and unboxing . Compared with developing your own classes it's a coin toss..

Performance surprise with “as” and nullable types

http://stackoverflow.com/questions/1583050/performance-surprise-with-as-and-nullable-types

long sw.ElapsedMilliseconds c# performance clr nullable unboxing share improve this question Clearly the machine code the..

Boxing and unboxing: when does it come up?

http://stackoverflow.com/questions/1949122/boxing-and-unboxing-when-does-it-come-up

and unboxing when does it come up So I understand what boxing and unboxing.. when does it come up So I understand what boxing and unboxing is. When's it come up in real world code or in what examples.. extremely oversimplified and I might have even done boxing unboxing without knowing it before. c# object boxing share improve..

Which is best for data store Struct/Classes?

http://stackoverflow.com/questions/1951186/which-is-best-for-data-store-struct-classes

objects' from the DDD book. Would you face some boxing unboxing penalty based on the usage of this object If yes go for class...

Why do we need boxing and unboxing in C#?

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

do we need boxing and unboxing in C# Why do we need boxing and unboxing in C# I know what.. need boxing and unboxing in C# Why do we need boxing and unboxing in C# I know what boxing and unboxing is but I can't comprehend.. we need boxing and unboxing in C# I know what boxing and unboxing is but I can't comprehend the real use of it. Why and where..

arraylist vs List<> in c#

http://stackoverflow.com/questions/2309694/arraylist-vs-list-in-c-sharp

casting to or from object which would have incurred boxing unboxing overhead when T is a value type in the ArrayList case . ArrayList..

Discriminated union in C#

http://stackoverflow.com/questions/3151702/discriminated-union-in-c-sharp

T As T if Is A return T object a Is this boxing and unboxing unavoidable if I want the union to hold value types and reference..

Why is TypedReference behind the scenes? It's so fast and safe… almost magical!

http://stackoverflow.com/questions/4764573/why-is-typedreference-behind-the-scenes-its-so-fast-and-safe-almost-magical

This is the ONLY way to treat value as int without boxing unboxing objects if value is int __refvalue __makeref value int 1 else.. i 0 i COUNT i Set2 arr 0 i Console.WriteLine Using boxing unboxing 0 ticks Environment.TickCount start Output Using TypedReference.. Output Using TypedReference 156 ticks Output Using boxing unboxing 484 ticks Edit I edited the benchmark above since the last..

Casting vs using the 'as' keyword in the CLR

http://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr

other than the value type case where I've noted that unboxing to a nullable value type is actually slower but consistent...

Get current System.Web.UI.Page from HttpContext?

http://stackoverflow.com/questions/58123/get-current-system-web-ui-page-from-httpcontext

...IWebBase via a reference conversion boxing conversion unboxing conversion wrapping conversion or null type conversion. c#..

What is the difference between the following casts in c#?

http://stackoverflow.com/questions/702234/what-is-the-difference-between-the-following-casts-in-c

you can't do o as int . The cast operator is also used for unboxing. as can be used to unbox to a nullable value type. The cast..

What is cool about generics, why use them?

http://stackoverflow.com/questions/77632/what-is-cool-about-generics-why-use-them

Faster than using objects as it either avoids boxing unboxing where .net has to convert value types to reference types or..

Boxing / Unboxing Nullable Types - Why this implementation?

http://stackoverflow.com/questions/1387597/boxing-unboxing-nullable-types-why-this-implementation

Unboxing Nullable Types Why this implementation Extract from CLR via.. Why this implementation Extract from CLR via C# on Boxing Unboxing value types ... On Boxing If the nullable instance is not null.. of 5 is boxed into a boxed Int32 with a value of 5. On Unboxing Unboxing is simply the act of obtaining a reference to the unboxed..

Boxing and unboxing: when does it come up?

http://stackoverflow.com/questions/1949122/boxing-and-unboxing-when-does-it-come-up

like this example int i 123 object o i Boxing int j int o Unboxing ...but that's almost certainly extremely oversimplified and.. ArrayList x new ArrayList x.Add 10 Boxing int y int x 0 Unboxing That was my most common experience of boxing and unboxing at..

Why do we need boxing and unboxing in C#?

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

object objshort s Boxing short anothershort short objshort Unboxing c# .net boxing share improve this question Why To have..

Cast object to decimal? (nullable decimal)

http://stackoverflow.com/questions/527453/cast-object-to-decimal-nullable-decimal

casting c# 2.0 nullable share improve this question Unboxing only works if the type is identical You can't unbox an object..