ObjectToDictionaryConverter.ToDictionaryObject method

Converts an arbitrary object to a dictionary with string keys and object values (without stringification).

public static Dictionary<string, object?> ToDictionaryObject(object? data)
parameter description
data The object to convert. Can be a dictionary, enumerable, or any object with public properties.

Return Value

A Dictionary with string keys and object values.

Remarks

Conversion behavior mirrors ToDictionary, but preserves original types instead of converting to strings.

See Also