How to

clone/copy struct

Published: 31. January 2012 | Updated: 31. January 2012
License: Microsoft Public License (MS-PL)
Categories: Framework » Basics
Tags: Basics C#
Was this snippet helpful for you? YESYES / NONO
int a = 25;
int b = a;

Console.WriteLine(a);
Console.WriteLine(b);

a = 30;

Console.WriteLine(a);
Console.WriteLine(b);
Console Output:
25
25
30
25
Send us feedback about this snippet »



Related Snippets: