ConversionOptions Properties |
The ConversionOptions type exposes the following members.
Name | Description | |
---|---|---|
AllowDefaultValueIfNotConvertible |
If true, conversion returns the destination's default value if the given value is not convertible to the given type.
This option is false by default.
| |
AllowDefaultValueIfNull |
If true, conversion returns the destination's default value if the given value is null and the type of destination doesn't support null.
This option is false by default.
| |
AllowDefaultValueIfWhitespace |
If true, conversion returns the destination's default value if the given value is an empty string and otherwise not convertible.
This option is false by default.
| |
ByteArrayFormat |
Defines the format used when converting an array of bytes to its equivalent string representation and vice versa.
The default format is Base64.
| |
ConstructorResolvingMode |
Defines if and how conversion will try to use a public constructor with it's only parameter beeing of the type of the given source value.
The default mode is Strict.
| |
DateTimeFormat |
Defines the format used when converting a date/time to its equivalent string representation.
The default format is "G".
| |
DateTimeLongMeaning |
Defines the meaning of a Long value when converting to DateTime.
The default meaning is Ticks.
| |
DateTimePatterns |
Gets the list of patterns used when converting a string to its DateTime equivalent.
E.g., these patterns are used as formats when calling DateTime.TryParseExact.
| |
DateTimeStyle |
Defines the DateTimeStyles used when converting a string to its DateTime equivalent.
The default is the combination of: DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite.
| |
DecimalFormat |
Defines the format used when converting a decimal to its equivalent string representation.
The default format is "G".
| |
DecimalNumberStyle |
Defines the NumberStyles used when converting a string to its decimal equivalent.
The default is the combination of: NumberStyles.Number | NumberStyles.AllowCurrencySymbol | NumberStyles.AllowExponent.
| |
FloatFormat |
Defines the format used when converting a float to its equivalent string representation.
The default format is "G".
| |
FloatNumberStyle |
Defines the NumberStyles used when converting a string to its float (float/double) equivalent.
The default is the combination of: NumberStyles.Float | NumberStyles.AllowThousands | NumberStyles.AllowTrailingSign | NumberStyles.AllowCurrencySymbol | NumberStyles.AllowExponent.
| |
GuidFormat |
Defines the format used when converting a guid to its equivalent string representation.
The default format is "D".
| |
HandleDBNullAsNull |
If true, Value is handled the same way as null.
This option is true by default.
| |
IntegerFormat |
Defines the format used when converting an integer to its equivalent string representation.
The default format is "G".
| |
IntegerNumberStyle |
Defines the NumberStyles used when converting a string to its integer (byte/int/long/sbyte/short/uint/ulong/ushort) equivalent.
The default is the combination of: NumberStyles.Integer | NumberStyles.AllowThousands | NumberStyles.AllowDecimalPoint | NumberStyles.AllowTrailingSign | NumberStyles.AllowCurrencySymbol | NumberStyles.AllowExponent.
| |
PropertyResolvingMode |
Defines if and how conversion will try to use a public property which matches the given type and whos name is identically to a constructor parameter.
The default mode is Strict.
|