.NET Portable TypeCast  3.1.0.4
A, easy-to-use tested, generic, portable, runtime-extensible, arbitrary type converter library
IConverter.cs
Go to the documentation of this file.
1 // <copyright file=mitlicense.md url=http://lsauer.mit-license.org/ >
2 // Lo Sauer, 2013-2016
3 // </copyright>
4 // <summary> A tested, generic, portable, runtime-extensible type converter library </summary
5 // <language> C# > 6.0 </language>
6 // <version> 3.1.0.2 </version>
7 // <author> Lorenz Lo Sauer; people credited in the sources </author>
8 // <project> https://github.com/lsauer/dotnet-portable-type-cast </project>
9 namespace Core.TypeCast
10 {
31  public interface IConverter
32  {
40  object Convert(object value, object defaultValue = null);
41  }
42 
52  public interface IConverter<in TIn, TOut>
53  {
61  TOut Convert(TIn value, TOut defaultValue = default(TOut));
62  }
63 }
The Base Converter interface.
Definition: IConverter.cs:31