How to swap two String values without using a
third variable?

Answer Posted / parthag

In C#, C sharp

string str1 = "First";
string str2 = "Second";
str1 = string.Concat(str1, str2);
str2 = str1.Replace(str2,"");
str1 = str1.Replace(str2,"");

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I HAVE DONE TESTING TOOLS COURSE,NOW I AM FRESHER,I AM NOT GETTING ANY CALLS,I WANT TO DO THE PROJECT ,WHERE I HAVE TO MEET TO DO THE PROJECT,I AM GOING WITH FAKE EXPERIENCE,SO WHAT I HAVE TO DO.

4312


It is possible to take number of controls added to form at run-time.ex-when user enter 6, 6 text boxes get added to form,next time number of controls get change as per user number enter. What is code for that?

1524


Is class is a abstract datatype in java?

1464


how to add a new table with variables and thier values into a imported file uisng proc import?

1462


what are resources in case of Threads

1675






When you deliver your C++ headers and C++ library of a class (what all can you change in the class so that application using your class does not need to recompile the code)

731


how we can know the funcions available in a class recording java?

1760


What is WEB 3.0? What are the features their in WEB3.0

1585


Is buffer size and file block size is similar? If similar,at which case it will be same size?

1742


How to connect to ms word wit VB ojective is to prepare s/w to generate question paper , selects questions randomly from the ms access , database

2019


Write a pascal program to calculate the sum of the first 100 even number and odd number

3975


THE CHANNEL IN DATA COMMUNICATION CAN BE?

1581


how to get second highest salary from a employee table and how get a 5th highest salary from a employee table by using proc sql?

1902


hi i m deepak my shedule for NIC pi is 17 Apr please contact me if anybody has interview on same day or give me some idea who have faced

1568


what are all the ant command options

1520