Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
int array element change with xor
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int[] ary = {1,3,5,7,9,2,4,6,8,10}; //array[3]與array[5]交換 ary[3] = ary[3] ^ ary[5]; Console.WriteLine(ary[3]); ary[5] = ary[3] ^ ary[5]; Console.WriteLine(ary[3]); ary[3] = ary[3] ^ ary[5]; Console.WriteLine(ary[3]); } } }
run
|
edit
|
history
|
help
0
Generics Operator test
Interface
Number loop
my cool stuff
asxsd dxsd
SMS filter config Captures and Groups
Testing bitwise stuff
property_comparison3
Reference Type parameter by Ref vs. Normal
my