+ 1
Change variable
In python i can change the variable like this a = 2 b = 10 a , b = b , a And variables changed Now I have problem in Csharp I wonna write this on csharp
3 Answers
+ 9
Unknown ,
in c# this can be done very similar like in python. see the code in the attached file:
(works for string and integer, double,...)
https://code.sololearn.com/cUbX8SkJv3X5/?ref=app
+ 2
Use a 3rd variable as helper. In case the variables are numeric, you can do something like:
a = a + b;
b = a - b;
a = a - b;