StatsSortOrder Class (.NET)

 

The StatsSortOrder class provides members that are used to control the sort order in which the CountryStats and RegionStats classes return their results in.

 

By default both the CountryStats and RegionStats classes return their enumerated results sorted by the number of hits descending (highest hit count returned first, lowest returned last).

 

To change the sort order from the default, pass one of the following members in the constructor to the CountryStats or RegionStats classes:

 

HitsDescending - default if no sort option specified, ordered by hits descending

HitsAscending - ordered by hits, ascending

CodeDescending - ordered by code, descending

CodeAscending - ordered by code, ascending

NameDescending - ordered by name, descending

NameAscending - ordered by name, ascending

 

VB.NET Example:

 

dim ctyStats as new CountryStats(CountryStats.StatsSortOrder.NameAscending)

C# Example:

 

CountryStats statsObj = new CountryStats(CountryStats.StatsSortOrder.NameAscending);

Note: For more information see the ch_statsByCountry_vb.aspx and ch_statsByRegion_vb.aspx samples.