HitCount Property (.NET)

 

The Enterprise Edition of CountryHawk automatically keeps track of the total number of hits (matches) for each country as you call the GetCountry method. Therefore at any point you can check the HitCount property to determine the number of hits for a particular country.

 

Note: Unless you call the PersistToFile method prior to your application shutdown, the statistics will be resent to zero upon the next usage of CountryHawk.

Syntax:

 countryHits = chObj.HitCount

Returns:

Total number of hits for the country represented by the particular CountryObj class.. This property always returns 0 with the Standard and Professional Editions of CountryHawk.

VB.NET Example:

dim chObj as CountryObj = CountryObj.GetCountry()

Response.Write("Total hits for your country: " + chObj.HitCount.ToString())

chObj = CountryObj.GetCountry("207.46.230.220")

Response.Write("<br>Total hits for 207.46.230.220 is: " + chObj.HitCount.ToString())

chObj = CountryObj.GetCountry("FR")

Response.Write("<br>Total hits for France is: " + chObj.HitCount.ToString())

C# Example:

CountryObj chObj = CountryObj.GetCountry();

Response.Write("Total hits for your country: " + chObj.HitCount.ToString());

chObj = CountryObj.GetCountry("207.46.230.220");

Response.Write("<br>Total hits for 207.46.230.220 is: " + chObj.HitCount.ToString());

chObj = CountryObj.GetCountry("FR");

Response.Write("<br>Total hits for France is: " + chObj.HitCount.ToString());

Note: See the ch_basics_vb.aspx, ch_statsByRegion_vb.aspx, and ch_statsByCountry_vb.aspx samples for more information.

Note: This property is read-only.

Note: Use of this property requires the Enterprise Edition of CountryHawk.

 

See Also:

RegionStats HitCount Property (.NET)