Class TzdbZone1970Location.Country
A country represented within an entry in the "zone1970.tab" file, with the English name
mapped from the "iso3166.tab" file.
  
  
  Since 2.0.x
  
  
  Availability net45, netstandard1.3
  
  Inheritance
Object
    TzdbZone1970Location.Country
  Implements
IEquatable<TzdbZone1970Location.Country>
  Inherited Members
      Object.Equals(Object, Object)
    
    
      Object.ReferenceEquals(Object, Object)
    
    
      Object.GetType()
    
    
      Object.MemberwiseClone()
    
  Namespace: NodaTime.TimeZones
Assembly: NodaTime.dll
Syntax
public sealed class Country : IEquatable<TzdbZone1970Location.Country>
  Constructors
Country(String, String)
Constructs a new country from its name and ISO-3166 2-letter code.
  
  
  Since 2.0.x
  
  
  Availability net45, netstandard1.3
  
  Declaration
public Country(string name, string code)
  Parameters
| Type | Name | Description | 
|---|---|---|
| String | name | Country name; must not be empty. | 
| String | code | 2-letter code | 
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | name or code is null | 
Properties
Code
Gets the ISO-3166 2-letter country code for the country.
  
  
  Since 2.0.x
  
  
  Availability net45, netstandard1.3
  
  Declaration
public string Code { get; }
  Property Value
| Type | Description | 
|---|---|
| String | The ISO-3166 2-letter country code for the country. (The value returned is never null.) | 
Name
Gets the English name of the country.
  
  
  Since 2.0.x
  
  
  Availability net45, netstandard1.3
  
  Declaration
public string Name { get; }
  Property Value
| Type | Description | 
|---|---|
| String | The English name of the country. (The value returned is never null.) | 
Methods
Equals(TzdbZone1970Location.Country)
Compares countries for equality, by name and code.
  
  
  Since 2.0.x
  
  
  Availability net45, netstandard1.3
  
  Declaration
public bool Equals(TzdbZone1970Location.Country other)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TzdbZone1970Location.Country | other | The country to compare with this one. | 
Returns
| Type | Description | 
|---|---|
| Boolean | true if the given country has the same name and code as this one; false otherwise. | 
      
Equals(Object)
Compares countries for equality, by name and code.
  
  
  Since 2.0.x
  
  
  Availability net45, netstandard1.3
  
  Declaration
public override bool Equals(object obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Object | obj | The object to compare this one with. | 
Returns
| Type | Description | 
|---|---|
| Boolean | true if the given object is a country with the same name and code as this one; false otherwise. | 
      
Overrides
System.Object.Equals(System.Object)
  
  GetHashCode()
Returns a hash code for this country.
  
  
  Since 2.0.x
  
  
  Availability net45, netstandard1.3
  
  Declaration
public override int GetHashCode()
  Returns
| Type | Description | 
|---|---|
| Int32 | A hash code for this country. | 
Overrides
System.Object.GetHashCode()
  
  ToString()
Returns a string representation of this country, including the code and name.
  
  
  Since 2.0.x
  
  
  Availability net45, netstandard1.3
  
  Declaration
public override string ToString()
  Returns
| Type | Description | 
|---|---|
| String | A string representation of this country. | 
Overrides
System.Object.ToString()
  Implements
      System.IEquatable<T>