Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arguments passed by Value & Reference????
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00613697
Message ID:
00614196
Views:
23
>That makes it clear.
>

But its actually more complicated in .NET. In .NET every variable inherits from the Object class. So every variable reference is an object reference and is passed by reference, right? Well no.

In .NET, there are Reference Types like strings and objects that are allocated from the heap and Value types like integers that are allocated on the stack. Working with value types will make your code run faster, but there are times that you will have to convert a Value object to a Reference object. This is a process call Boxing.

You can learn about some fundamental .NET concepts at http://www.netknowledgenow.com/lexicon.

And just to prove that I'm not making this all up, here is an MSDN article that discusses boxing in depth:
http://msdn.microsoft.com/msdnmag/issues/1200/dotnet/dotnet1200.asp

-Dave
Previous
Reply
Map
View

Click here to load this message in the networking platform