Click or drag to resize

csvFileExtensionsfromCsvFileT Method

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Reads data from CSV file and returns collection of an object

Namespace:  imbSCI.DataComplex.extensions.data.formats
Assembly:  imbSCI.DataComplex (in imbSCI.DataComplex.dll) Version: 0.3.70.
Syntax
C#
public static IList<T> fromCsvFile<T>(
	this IList<T> collection,
	string path,
	bool clearExistingRecords = false
)
where T : class, new()
Request Example View Source

Parameters

collection
Type: System.Collections.GenericIListT
The collection.
path
Type: SystemString
The path.
clearExistingRecords (Optional)
Type: SystemBoolean
if set to true [clear existing records].

Type Parameters

T

Return Value

Type: IListT

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionpath - File path can't be null nor empty
ArgumentException path - File at ["+path+"] does not exist. or path - File reading failed [" + path + "].
See Also