Click to See Complete Forum and Search --> : how u put " charater in a string


FundooGuy
February 16th, 2005, 04:03 AM
Hi guru's

i have a string var in which i need to add another var within doube quotes.

string str="<learning object id=" + strcode + ">";

str variable must be like this

<learning object id="1">

i m using c# language and i dont know how to add those double quotes in the id .

please help me

Ajay Vijay
February 16th, 2005, 04:16 AM
Prefix the string with '@' and put double quatation ("") within the string to make it part of the string. Following example puts "1" into string. Please modify the code as per your needs.string str=@"<learning object id=""1"">";