Use XML Literals in C#?
XML literals are a feature of VB.NET, not C#. What you have posted is as close as you can get in C#. You may want to consider replacing the embedded double quotes with single quotes though (as both types are valid XML). For larger amounts of XML you may want to consider the answer from … Read more