Click here to Skip to main content
15,879,239 members
Articles / Programming Languages / C#

Six Important .NET Concepts: Stack, Heap, Value Types, Reference Types, Boxing, and Unboxing

Rate me:
Please Sign up or sign in to vote.
4.90/5 (434 votes)
23 Jun 2021CPOL7 min read 1.5M   3K   659  
An introduction to stack, heap, value types, reference types, boxing, and unboxing
In this article, you will learn about what happens internally when you declare a variable followed by an explanation of two important concepts: stack and heap. The article then talks about reference types and value types and clarifies some of the important fundamentals around them. Finally, you will see a demonstration of how performance is hampered due to boxing and unboxing, with sample code.

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect https://www.questpond.com
India India

Comments and Discussions