New course! Every coder should learn Generative AI!
Try a free lesson0
Just like how you swap numbers
string a="apple";
string b="banana";
string temp=a;
a=b;
b=temp;
Console.WriteLine(a+"\n"+b);
output:
banana
apple