c# class to dictionary code example
Example 1: convert dto to dictionary c#
someObject.GetType()
.GetProperties(BindingFlags.Instance | BindingFlags.Public)
.ToDictionary(prop => prop.Name, prop => prop.GetValue(someObject, null))
Example 2: c# dictionary functions
Dictionary<int, Func<string, bool>>