Created
January 27, 2012 21:06
-
-
Save runegri/1690917 to your computer and use it in GitHub Desktop.
How to use XamlWriter and XamlReader
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var test = new Test {Name = "Rune", Number = 35}; | |
var serialized = XamlWriter.Save(test); | |
var deserialized = (Test) XamlReader.Parse(serialized); | |
} | |
} | |
public class Test | |
{ | |
public string Name { get; set; } | |
public int Number { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
XamlWriter.Save() and XamlReader.Parse() doesn't exist for me? which assembly did you get it from?