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

Answer Posted / parthag

In C#

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

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I want Ada programming language books. Could anyone post me any link for that?

2956


what are stubs related to foxpro?

1667


Why did you ever become involved in QA/testing?

1614


what are the activities you enjoy most and How do you see these Developing in the Future with Reference to in your work life and in your personal life

1045


How to change the color of a cell or a row in a datagrid on mouse hover using javascript/.net

1541






When we delete logfiles such as screenshots how does it affect the ldf file? Ive seen huge change while adding screenshots in the ldf file but a very minor one deleting them.Please Explain

1419


when a query is made on Logical file in DB2/400, will the records satisfying select/omit criterion be fetched from all members of physical file or only the member with same name as physical file?

1724


Find out the roles which gives access to all tables in SAP? Thanks in advance.

1568


Hi..Am done with my Masters recently..Am planning to learn TIBCO.. could anyone suggest me about how the job market will be and Is there any course necessary to learn prior to Tibco..i mean any prerequisite. I dnt have any knowledge on PL/SQL thats it... Plz suggest me in a best way...

1795


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

3971


Difference between debugging, running, executing of an application

3491


how to work search engine? plz detail answer me.

1495


How to merge Action Form with Dyna Action Form in Struts.

1905


what is the extension of SPDS Dynamic cluster tables?

1632


write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe

1569