Skip to content

TypeConverter Class

A serializer/deserializer combo for some type(s). Used by the config system.

C#
public class TypeConverter

Inheritance object

Used to serialize the type into a (hopefully) human-readable string. Object is the instance to serialize, Type is the object’s type.

C#
public Func<object, Type, string> ConvertToString { get; set; }

Used to deserialize the type from a string. String is the data to deserialize, Type is the object’s type, should return instance to an object of Type.

C#
public Func<string, Type, object> ConvertToObject { get; set; }