Groups | Blog | Home
all groups > asp.net > july 2003 >

asp.net : Application state


Ninja
7/21/2003 10:35:31 PM
Is everything stored in Application or Session state boxed? For example:
Application["MyVar"] = 10;

Is there boxing involved?

Thanks.
Just learning ASP.NET

Kevin Spencer
7/22/2003 8:00:30 AM
Boxing doesn't come into play until you treat a value type like a reference
type. For example, the integer 10 is a value type. But if you execute any of
the integer methods on the number, it is boxed as an object and then the
method is executed. Therefore, what memory space (such as Application State)
you store a variable in has no effect upon what is stored there.
--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big things are made up of
lots of little things.

[quoted text, click to view]

AddThis Social Bookmark Button