Table of Contents

Class ConverterBase

Namespace
Utils.Objects
Assembly
Utils.dll

An abstract base class that automatically adds public instance and static methods (with exactly one parameter) as conversion delegates.

public abstract class ConverterBase : SimpleConverter, IConverter, IEnumerable<Delegate>, IEnumerable
Inheritance
ConverterBase
Implements
Inherited Members
Extension Methods

Remarks

By inheriting this class, any single-parameter methods you define are registered as valid conversion operations in the constructor. For example:

public class NewConverter : ConverterBase
{
    // This method will automatically be registered to convert string to int.
    public int ToInt32(string value) => int.Parse(value);
}

Constructors

ConverterBase()

Initializes a new instance of the ConverterBase class and registers all single-parameter methods in the inheritance chain as conversion delegates.

protected ConverterBase()

See Also