Click or drag to resize
DataHelper.GetValuesFrequency Method (DataTable, String)
Gets frequency of values in specified data table's column.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 12.0.0
Syntax
C#
public static Dictionary<Object, int> GetValuesFrequency(
	DataTable dt,
	string columnName
)

Parameters

dt
Type: System.Data.DataTable
Data table.
columnName
Type: System.String
Name of column for which the frequency is determined.

Return Value

Type: Dictionary<Object, Int32>
Pairs of (value, occurrences count) in dt's column named columnName.
See Also