SimpleStringConverter Class

Provides utility methods to simplify use of type converters derived from SimpleStringConverter<T>.

public static class SimpleStringConverter

Methods

NameDescription
AddToTypeDescriptor<T>()Registers a type converter for use by TypeDescriptor methods, where the type to convert to implements the IParsable<TSelf> interface. This method is not available in the netstandard and .NET Framework builds of Louis, because their BCL has no IParsable<TSelf>.
AddToTypeDescriptor<T, TConverter>()Registers a type converter for use by TypeDescriptor methods.

AddToTypeDescriptor overloads

AddToTypeDescriptor<T>()

Available in: net10.0net11.0(not available in the other target frameworks of the package)

Registers a type converter for use by TypeDescriptor methods, where the type to convert to implements the IParsable<TSelf> interface.

This method is not available in the netstandard and .NET Framework builds of Louis, because their BCL has no IParsable<TSelf>.

public static void AddToTypeDescriptor<T>() where T : IParsable<T>
Type parameters
T
The type of the object to convert to / from String. The type must implement the IParsable<TSelf> interface.

AddToTypeDescriptor<T, TConverter>()

Registers a type converter for use by TypeDescriptor methods.

net10.0, net11.0

public static void AddToTypeDescriptor<T, TConverter>() where TConverter : SimpleStringConverter<T>

net48, netstandard2.0

public static void AddToTypeDescriptor<T, TConverter>() where TConverter : SimpleStringConverter<T>
Type parameters
T
The type of the object to convert to / from String.
TConverter
The type of the converter to use.