Skip to content

66048e60 2805 eaed 4fba cfaad6bd2d21

Axel Kesseler edited this page Aug 16, 2024 · 6 revisions

TypeConverter.AsUInt16 Method

This method converts given value into an object representing a Unsigned Short type.

Namespace: Plexdata.CsvParser.Internals
Assembly: Plexdata.CsvParser.NET (in Plexdata.CsvParser.NET.dll) Version: 1.1.3+d5bef99aa35461ce4bafadf0bf2c2aeca18044ea

Syntax

C#

private static Object AsUInt16(
	string value,
	bool exactly,
	bool nullable,
	CultureInfo culture,
	CsvMappings mapping
)

Parameters

 

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.

Return Value

Type: Object
An object representing the type-save version of converted value. A return value of Max Value may indicate a conversion error.

Exceptions

 

Exception Condition
FormatException This exception is throw in case of a conversion has failed, but only if exactly is true.

Remarks

A value of is returned if given value is 'null' or 'empty' and its type is of type Nullable.

See Also

Reference

TypeConverter Class
Plexdata.CsvParser.Internals Namespace

Clone this wiki locally