C#?????????????????????????????
???????????? ???????[ 2014/12/5 16:11:03 ] ????????C# ??????? ????
????c#?????????int????????????????????????????????????????????£????????
????int a = 10;
????int b = 5;
????int c ;
????c = a;
????a = b;
????b = c;
??????????????????????????м????????????
????1.?????(???????????????????????????????????????????????????????)
????int a = 10;
????int b = 5;
????a ^= b;
????b ^= a;
????a ^= b;
????Console.WriteLine("{0} {1}"?? a?? b);
????2.?????(?????????????(??????Int32.MaxValue?????????г????????????????????????????????????????????????.net?汾??????????????))
????a = a + b - (b = a);
????????(??????????)
????b = a + (a = b) * 0;
??????????????????????е?????????????????к????????е?+-*/??????????????
??????????????????????????????
????????a=a+b-(b=a)?????????????????
IL_0006: ldloc.0 //?????????0??????10???????
IL_0007: ldloc.1 //????5???????
IL_0008: add //???10??5?????add??????15??????????
IL_0009: ldloc.0 //????10???????
IL_000a: dup //????10???????
IL_000b: stloc.1 //????????????????1??????
IL_000c: sub //????????????10??15????????????5?????????
IL_000d: stloc.0 //????????????????0??????
????????????????????????a+b????????н??м??????int??????κα???????????????????ò????????
????b=a+(a=b)*0;?????????????????????????????????£????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11