Created
March 18, 2025 17:21
-
-
Save dontpaniclabsgists/f213945358be07631f088bf542108f58 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
var namespaces = new XmlSerializerNamespaces(); | |
namespaces.Add(string.Empty, string.Empty); | |
XmlSerializer serializer = new XmlSerializer(typeof(Person)); | |
using (StringWriter writer = new StringWriter()) | |
{ | |
serializer.Serialize(writer, person, namespaces); | |
Console.WriteLine(writer.ToString()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment