Table of Contents

Method Subset

Namespace
YndigoBlue.Velocity.Utils
Assembly
YndigoBlue.Velocity.dll

Subset(DataTable, string, params string[])

Creates a subset of the DataTable containing only rows matching the filter and specified columns.

public static DataTable Subset(this DataTable dataTable, string filter, params string[] columns)

Parameters

dataTable DataTable

The source DataTable.

filter string

The filter expression to apply (DataTable.Select syntax).

columns string[]

The columns to include in the subset.

Returns

DataTable

A new DataTable containing filtered rows with only the specified columns.

Subset(DataTable, string)

Creates a subset of the DataTable containing only rows matching the filter.

public static DataTable Subset(this DataTable dataTable, string filter)

Parameters

dataTable DataTable

The source DataTable.

filter string

The filter expression to apply (DataTable.Select syntax).

Returns

DataTable

A new DataTable containing filtered rows with all columns.

Subset(DataTable, params string[])

Creates a subset of the DataTable containing only the specified columns.

public static DataTable Subset(this DataTable dataTable, params string[] columns)

Parameters

dataTable DataTable

The source DataTable.

columns string[]

The columns to include in the subset.

Returns

DataTable

A new DataTable containing all rows with only the specified columns.