1
Answer

how to display xml key using double quotes in C# Program

Ask a question
Reetu

Reetu

18y
3.6k
1
Hi,
I have a program where I displayed the xml key and values . I need to display the key and values in double quotes.

I am able to display them in single quotes in the following code segment, but unable to use double quotes. Anyone who has a better idea, pls help.

Here is the code segment, so if I put {'0'}, it appears , but then it woudnt work with {"0"}.

Console.WriteLine("<add Key= {0} Value={1}/>",xn.Attributes.GetNamedItem("key").Value,xn.Attributes.GetNamedItem("value").Value);


Answers (1)