Showing posts with label reference types. Show all posts
Showing posts with label reference types. Show all posts

Saturday, 19 September 2015

Value Types Vs Reference Types Dotnet

Stack and heap In order to understand stack and heap, let’s understand what actually happens in the below code internally. public void Method1() { // Line 1 int i=4; // Line 2 int y=2; //Line 3 class1 cls1 = new class1(); } It’s a three line code,...