GYearMonth StructureGYearMonth StructureGYearMonth Structure

Represents a Gregorian year and month. The corresponding XML Schema type is xs:gYearMonth.

Syntax

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

Constructors

 ConstructorDescription
Public methodGYearMonth (long, int)GYearMonth (Long, Integer)GYearMonth (long, int) Initializes a new instance of the GYearMonthGYearMonthGYearMonth structure with the specified year and month, but without a specified time zone.
Public methodGYearMonth (long, int, TimeZone?)GYearMonth (Long, Integer, Nullable(Of TimeZone))GYearMonth (long, int, Nullable<TimeZone>) Initializes a new instance of the GYearMonthGYearMonthGYearMonth structure with the specified year, month and optional time zone.

Top

Properties

 PropertyDescription
Public propertyMonthMonthMonth Gets the month of the year.
Public propertyTimeZoneTimeZoneTimeZone Gets the optional time zone component of this GYearMonthGYearMonthGYearMonth.
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 (GYearMonth)Equals (GYearMonth)Equals (GYearMonth) Indicates whether this instance is equal to another GYearMonthGYearMonthGYearMonth.
Public methodstaticEquals (GYearMonth, GYearMonth, TimeZone)Equals (GYearMonth, GYearMonth, TimeZone)Equals (GYearMonth, GYearMonth, TimeZone) Indicates whether a specified GYearMonthGYearMonthGYearMonth is equal to another specified GYearMonthGYearMonthGYearMonth 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:gYearMonth to its GYearMonthGYearMonthGYearMonth equivalent.
Public methodToStringToStringToString Returns the canonical lexical representation of this GYearMonthGYearMonthGYearMonth (Overrides ValueType.ToStringValueType.ToStringValueType::ToString)
Public methodstaticTryParseTryParseTryParse Converts a lexical representation of an xs:gYearMonth to its GYearMonthGYearMonthGYearMonth equivalent. A return value indicates whether the conversion succeeded or failed.

Top

Operators

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

Top

Remarks

A GYearMonthGYearMonthGYearMonth represents a Gregorian calendar year and month.

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