17152dce 94e3 49d6 9654 b9c4b412c01e - akesseler/Plexdata.CsvParser GitHub Wiki

TypeConverter.IntoObject Method

This method converts given value into its type-safe object representation.

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

Syntax

C#

internal static Object IntoObject(
	string value,
	Type type,
	bool exactly,
	CultureInfo culture,
	CsvMappings mapping
)

Parameters

 

value
Type: System.String
The value to be converted.
type
Type: System.Type
The expected result type of the value.
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.
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.
ArgumentNullException This exception is thrown in cases of 'value', 'type' or 'culture' is . This exception is also thrown in case of 'type' is considered as Nullable and its embedded couldn't be determined.
NotSupportedException This exception is thrown in all cases of trying to convert unsupported data types.

Remarks

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

At the moment, the supported data types are: String, Boolean, Char, SByte, Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64, DateTime, Decimal, Double and Single. Method ToString() is used for all other type conversion.

See Also

Reference

TypeConverter Class
Plexdata.CsvParser.Internals Namespace

⚠️ **GitHub.com Fallback** ⚠️