2014/07/07

Adding two integers without temporary variable - C#

static void swamp(ref int x, ref int y)
{
x = x + y;
y = x - y;
x = x - y;
}
view raw gistfile1.cs hosted with ❤ by GitHub

No comments:

Post a Comment