.NET Portable TypeCast  3.1.0.4
A, easy-to-use tested, generic, portable, runtime-extensible, arbitrary type converter library
Core.TypeCast.IConverter Interface Reference

The Base Converter interface. More...

+ Collaboration diagram for Core.TypeCast.IConverter:

Detailed Description

The Base Converter interface.

@code{cs}
[Converter]
public class CustomConverters : IConverter, IConverter<object, decimal>, IConverter<string, decimal>
{
public decimal Convert(object value, decimal defaultValue)
{
return this.Convert(value != null ? value.ToString() : string.Empty, defaultValue);
}
}
@endcode
See also
Converter

It is not required, but recommended for a custom converter to support the common IConverter interface

  • depending on the converter design guidelines followed, as laid out in the project documentation

Definition at line 31 of file IConverter.cs.


The documentation for this interface was generated from the following file: