Value Types
Value types store data directly on the stack. When you assign a value type to another variable, a copy is made.
int a = 10;int b = a; // copyb = 20;Console.WriteLine($"a: {a}, b: {b}");Run the Application
Section titled “Run the Application”dotnet runResult
Section titled “Result”a: 10, b: 20