Created
March 18, 2025 17:12
-
-
Save dontpaniclabsgists/07da20a98427bb2d0cdbdd823ddbd61d 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
using System; | |
using System.IO; | |
using System.Text; | |
using System.Xml.Serialization; | |
public static void SerializeAndPrint() | |
{ | |
XmlSerializer serializer = new XmlSerializer(typeof(Person)); | |
using (StringWriter writer = new StringWriter()) | |
{ | |
serializer.Serialize(writer, person); | |
Console.WriteLine(writer.ToString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment