This topic has been archived. It cannot be replied.
工作学习 / 学科技术 / how to swap two values in .net? for example int a, int b, how to swap the value of them?
-binghongcha76(一只大猫);
2022-3-18{103}(#14451430@0)
老方法是借助一个临时变量 c
C# 7以后引入了一个新的语法
(a,b) = (b,a);
ya easy..
Any use cases of switching values of two variables?
-sailor(Ocean & Mountain);
2022-3-18(#14451564@0)
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.