RegionStats Class Properties (.NET)

 

The RegionStats class exposes statistics on the total number of hits per region. This class is similar to the CountryStats class except it is specific to stats per region instead of per country.

 

To obtain a list of statistics by region, simply use foreach enumeration. The following examples demonstrate how to enumerate the RegionStats object to obtain a list of statistics by region:

VB.NET Example:

 

dim regionStats as new RegionStats()

dim regObj as RegionObj

for each regObj in regionStats

 Response.Write(regObj.RegionName + " " + regObj.RegionCode + " ")

 Response.Write(regObj.HitCount.ToString() + "<br>")

next regObj

C# Example:

 

RegionStats regionStats = new RegionStats();

foreach (RegionObj regObj in regionStats)

{

 Response.Write(regObj.RegionName + " " + regObj.RegionCode + " ");

 Response.Write(regObj.HitCount.ToString() + "<br>");

}

 

Note: See the ch_statsByRegion_vb.aspx sample for more details.

 

Note: You can control the sort order of the returned results by specifying a member of the StatsSortOrder class.

Note: Use of the CountryStats class requires the Enterprise Edition of CountryHawk.