GYear StructureGYear StructureGYear Structure

Represents a Gregorian year. The corresponding XML Schema type is xs:gYear.

Syntax

Public NotInheritable  GYear _
        Implements IEquatable(Of GYear)
public sealed  GYear : IEquatable<GYear>
public:
value class GYear sealed : IEquatable<GYear>
 
The GYearGYearGYear type exposes the following members.

Constructors

 ConstructorDescription
Public methodGYear (long)GYear (Long)GYear (long) Initializes a new instance of the GYearGYearGYear structure with the specified calendar year, but without a time zone.
Public methodGYear (long, TimeZone?)GYear (Long, Nullable(Of TimeZone))GYear (long, Nullable<TimeZone>) Initializes a new instance of the GYearGYearGYear structure with the specified calendar year and optional time zone.

Top

Properties

 PropertyDescription
Public propertyTimeZoneTimeZoneTimeZone Gets the optional time zone component of this GYearGYearGYear.
Public propertyYearYearYear Gets the calendar year.

Top

Methods

 MethodDescription
Public methodEquals (object)Equals (Object)Equals (object^) Determines whether this instance is equal to a specified object. (Overrides ValueType.EqualsValueType.EqualsValueType::Equals)
Public methodEquals (GYear)Equals (GYear)Equals (GYear) Determines whether this instance is equal to another GYearGYearGYear.
Public methodstaticEquals (GYear, GYear, TimeZone)Equals (GYear, GYear, TimeZone)Equals (GYear, GYear, TimeZone) Indicates whether a specified GYearGYearGYear is equal to another specified GYearGYearGYear given the supplied implicit time zone.
Protected methodObject.FinalizeObject.FinalizeObject::Finalize Allows an objectObjectobject to attempt to free resources and perform other cleanup operations before the objectObjectobject is reclaimed by garbage collection. (Inherited from System.ObjectSystem.ObjectSystem::Object)
Public methodGetHashCodeGetHashCodeGetHashCode Returns the hash code for this instance. (Overrides ValueType.GetHashCodeValueType.GetHashCodeValueType::GetHashCode)
Public methodObject.GetTypeObject.GetTypeObject::GetType Gets the TypeTypeType of the current instance. (Inherited from System.ObjectSystem.ObjectSystem::Object)
Protected methodObject.MemberwiseCloneObject.MemberwiseCloneObject::MemberwiseClone Creates a shallow copy of the current objectObjectobject. (Inherited from System.ObjectSystem.ObjectSystem::Object)
Public methodstaticParseParseParse Converts the lexical representation of an xs:gYear to its GYearGYearGYear equivalent.
Public methodToStringToStringToString Returns the canonical lexical representation of this GYearGYearGYear. (Overrides ValueType.ToStringValueType.ToStringValueType::ToString)
Public methodstaticTryParseTryParseTryParse Converts a lexical representation of an xs:gYear to its GYearGYearGYear equivalent. A return value indicates whether the conversion succeeded or failed.

Top

Operators

 OperatorDescription
Public operatorstaticEqualityEqualityEquality Indicates whether a specified GYearGYearGYear is equal to another specified GYearGYearGYear.
Public operatorstaticInequalityInequalityInequality Indicates whether a specified GYearGYearGYear is not equal to another specified GYearGYearGYear.

Top

Fields

 FieldDescription
Public fieldstaticInvalidInvalidInvalid The invalid GYearGYearGYear value.
Public fieldstaticMaxYearMaxYearMaxYear The maximum year representable in a GYearGYearGYear.
Public fieldstaticMinYearMinYearMinYear The maximum year representable in a GYearGYearGYear.

Top

Remarks

A GYearGYearGYear represents a Gregorian calendar year.

Note that the year 1 B.C. is represented by -1, and so 0 is not a valid year.