9cf3d736 7fad 104c 86ee 37478a209b74 - akesseler/Plexdata.CsvParser GitHub Wiki

CsvContainerExtension.Sort Method (CsvContainer, Int32, SortOrder)

Sorts the container by referenced column and in provided sort order.

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

Syntax

C#

public static void Sort(
	this CsvContainer container,
	int column,
	SortOrder order
)

Parameters

 

container
Type: Plexdata.CsvParser.Processors.CsvContainer
The container to be sorted.
column
Type: System.Int32
The zero-based column index to be used by sorting.
order
Type: Plexdata.CsvParser.Definitions.SortOrder
The sort order to be used.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type CsvContainer. 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).

Remarks

This extension method sorts the container by referenced column and in provided sort order.

The Heading property of the container should be enabled as long as a CSV header is used. Because otherwise the CSV header is not excluded from sorting.

Any string is compared by using the value of property Compare.

See Also

Reference

CsvContainerExtension Class
Sort Overload
Plexdata.CsvParser.Extensions Namespace
CsvContainerExtension.Sort(CsvContainer, String, SortOrder)
CsvContainer.Compare
CsvContainer.Heading

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