Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
XmlSerializer
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Xml; using System.IO; using System.Xml.Serialization; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { string text = ""; XmlSerializer serializer = new XmlSerializer(typeof(Test)); Test test = new Test() {intValue = 32, enum1 = TestEnum.local, enum2 = TestEnum.Val2}; StringWriter writer = new StringWriter(); serializer.Serialize(writer, test); Console.Write(writer.ToString()); } } [XmlRoot("Test")] public class Test { [XmlAttribute] public int intValue; public TestEnum enum1; [XmlAttribute] public TestEnum enum2; } public enum TestEnum { Val1, Val2, Val3, local } }
run
|
edit
|
history
|
help
0
Square Integer Matrix
problem_name
Ref
1234
bytes to string to bytes.
IEnumeratorExample
Exception handling2
23
schach 1 sem
Jp-trize