Noda Time
Show / Hide Table of Contents

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 netstandard2.0
Inheritance
Object
TzdbZone1970Location.Country
Implements
IEquatable<TzdbZone1970Location.Country>
Inherited Members
Object.Equals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: NodaTime.TimeZones
Assembly: NodaTime.dll
Syntax
public sealed class Country : IEquatable<TzdbZone1970Location.Country>
Remarks

Equality is defined component-wise: two values are considered equal if their country names are equal to each other, and their country codes are equal to each other.

Constructors

Country(String, String)

Constructs a new country from its name and ISO-3166 2-letter code.
Since 2.0.x
Availability netstandard2.0
Declaration
public Country(string name, string code)
Parameters
Type Name Description
String name Country name; must not be empty.
String code 2-letter code

Properties

Code

Gets the ISO-3166 2-letter country code for the country.
Since 2.0.x
Availability netstandard2.0
Declaration
public string Code { get; }
Property Value
Type Description
String The ISO-3166 2-letter country code for the country.

Name

Gets the English name of the country.
Since 2.0.x
Availability netstandard2.0
Declaration
public string Name { get; }
Property Value
Type Description
String The English name of the country.

Methods

Equals(TzdbZone1970Location.Country)

Compares countries for equality. See the type documentation for a description of equality semantics.
Since 2.0.x
Availability netstandard2.0
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. See the type documentation for a description of equality semantics.
Since 2.0.x
Availability netstandard2.0
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. See the type documentation for a description of equality semantics.
Since 2.0.x
Availability netstandard2.0
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 netstandard2.0
Declaration
public override string ToString()
Returns
Type Description
String A string representation of this country.
Overrides
System.Object.ToString()

Implements

System.IEquatable<T>
In this article
Back to top Generated by DocFX