f19049ef 6eb0 5fa2 f2d7 3acbd7b20534 - akesseler/Plexdata.CsvParser GitHub Wiki

CsvContainer.TryGetValue(TType) Method (String, Int32)

This method tries to get the type-save value for provided header an at specified index.

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

Syntax

C#

public Object TryGetValue<TType>(
	string header,
	int index
)

Parameters

 

header
Type: System.String
The header name of affected column.
index
Type: System.Int32
The zero-based index of affected row.

Type Parameters

 

TType
The expected type to convert the string value into.

Return Value

Type: Object
An object representing the value for provided header and at specified index or null either if a value for header and index could not be found or an exception has occurred during type conversion.

Remarks

This method is intended as an alternative to method GetValue(TType)(String, Int32) because this method does not throw any exception.

See Also

Reference

CsvContainer Class
TryGetValue Overload
Plexdata.CsvParser.Processors Namespace
CsvContainer.Exactly
CsvContainer.Culture
CsvContainer.Mappings
CsvContainer.GetValue(TType)(String, Int32)
CsvContainer.GetObject(String, Type)
TypeConverter.IntoObject(String, Type, Boolean, CultureInfo, CsvMappings)

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