485e5a80 2d13 3f8c 2639 6c04e715223b - akesseler/Plexdata.CsvParser GitHub Wiki
This method converts given value into an object representing a Decimal type.
Namespace: Plexdata.CsvParser.Internals
Assembly: Plexdata.CsvParser.NET (in Plexdata.CsvParser.NET.dll) Version: 1.1.3+d5bef99aa35461ce4bafadf0bf2c2aeca18044ea
C#
private static Object AsDecimal(
string value,
bool exactly,
bool nullable,
CultureInfo culture,
CsvMappings mapping
)
- value
- Type: System.String
The value to be converted. - exactly
- Type: System.Boolean
If true, a Format Exception is thrown in case of a conversion was impossible. Otherwise the Max Value is returned in such a case. - nullable
- Type: System.Boolean
Indicates whether given type is of type Nullable. - culture
- Type: System.Globalization.CultureInfo
The culture information to be used for conversion. - mapping
- Type: Plexdata.CsvParser.Processors.CsvMappings
The mapping to be used for value transformation.
Type: Object
An object representing the type-save version of converted value. A return value of Max Value may indicate a conversion error.
Exception | Condition |
---|---|
FormatException | This exception is throw in case of a conversion has failed, but only if exactly is true. |
A value of is returned if given value is 'null' or 'empty' and its type is of type Nullable.