ff44dd43 98a5 f484 f951 2f522d392c26 - akesseler/Plexdata.CsvParser GitHub Wiki
This method converts given value into an object representing a String type.
Namespace: Plexdata.CsvParser.Internals
Assembly: Plexdata.CsvParser.NET (in Plexdata.CsvParser.NET.dll) Version: 1.1.3+d5bef99aa35461ce4bafadf0bf2c2aeca18044ea
C#
private static Object AsString(
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. |
The conversion into a string takes place by just returning given value.