Class Convert<TFrom, TTo>
Converters provider for value conversion from TFrom to TTo type.
public static class Convert<TFrom, TTo>
Type Parameters
TFromSource conversion type.
TToTarget conversion type.
- Inheritance
-
objectConvert<TFrom, TTo>
Properties
Expression
Gets or sets an expression that converts a value of TFrom type to TTo type. Setter updates both expression and delegate forms of converter. Assigning null value will reset converter to default conversion logic. Assigning non-null value will also set converter as default converter.
public static Expression<Func<TFrom, TTo>> Expression { get; set; }
Property Value
- Expression<Func<TFrom, TTo>>
From
Gets conversion function delegate.
public static Func<TFrom, TTo> From { get; }
Property Value
- Func<TFrom, TTo>
Lambda
Gets or sets a function that converts a value of TFrom type to TTo type. Setter updates both expression and delegate forms of converter. Assigning null value will reset converter to default conversion logic. Assigning non-null value will also set converter as default converter.
public static Func<TFrom, TTo> Lambda { get; set; }
Property Value
- Func<TFrom, TTo>