exchange two numerical variables without the third var
Published: 31. January 2012 | Updated: 31. January 2012License: Microsoft Public License (MS-PL)
Categories: Framework
Tags: C#
int a = 164895; int b = -45; a = a + b; b = a - b; a = a - b; Console.WriteLine(a); Console.WriteLine(b);Console Output:
-45
164895
164895
| Send us feedback about this snippet » |





