Last active
January 4, 2017 17:18
-
-
Save binki/9d09ea0ae8ea43788505af08844dae79 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<x y="uh, 5"> | |
<child1 />hi. 2×4=8<child2 c2a1="non-interpolated $tring{}" /></x> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Xml.Linq; | |
class XElementDemo | |
{ | |
static void Main(string[] args) | |
{ | |
var tree = new XElement( | |
"x", | |
new XAttribute("y", $"uh, {1+4}"), | |
new XElement("child1"), | |
$"hi. 2×4={2*4}", | |
new XElement( | |
"child2", | |
new XAttribute("c2a1", "non-interpolated $tring{}"))); | |
Console.WriteLine(tree); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment