Skip to content

Instantly share code, notes, and snippets.

View Kraego's full-sized avatar
:octocat:
Back @ work

Thomas Kraxner Kraego

:octocat:
Back @ work
View GitHub Profile
@Kraego
Kraego / DynamicHelper.cs
Last active October 3, 2022 11:10 — forked from martinnormark/DynamicHelper.cs
C# Dynamic extension methods for serializing to XML
using System.Reflection;
using System.Xml;
using System.Xml.Linq;
public static class DynamicHelper
{
/// <summary>
/// Defines the simple types that is directly writeable to XML.
/// </summary>
private static readonly Type[] _writeTypes = new[] { typeof(string), typeof(DateTime), typeof(Enum), typeof(decimal), typeof(Guid) };