c# linq todictionary example Example: function toDictionary var propertyDictionary = object.ToDictionary(x => x.Property1, x => x.Property2);