SoapMonthDay SoapMonthDay SoapMonthDay SoapMonthDay Class

Definition

Wraps an XSD gMonthDay type.

public ref class SoapMonthDay sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class SoapMonthDay : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
type SoapMonthDay = class
    interface ISoapXsd
Public NotInheritable Class SoapMonthDay
Implements ISoapXsd
Inheritance
SoapMonthDaySoapMonthDaySoapMonthDaySoapMonthDay
Attributes
Implements

Examples

The following code example shows how to use the members in the SoapMonthDay class to convert between a SoapMonthDay object and an XSD gMonthDay string.

#using <System.dll>
#using <System.Runtime.Remoting.dll>
using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;

int main()
{
   // Parse an XSD gMonthDay to create a SoapMonthDay object.
   // Parse the representation for February 21, in the UTC+8 time zone.
   String^ xsdMonthDay = L"--02-21+08:00";
   SoapMonthDay^ monthDay = SoapMonthDay::Parse( xsdMonthDay );

   // Print the monthDay in XSD format.
   Console::WriteLine( L"The SoapMonthDay object in XSD format is {0}.",
      monthDay );

   // Print the XSD type string of this particular SoapMonthDay object.
   Console::WriteLine( L"The XSD type of the SoapMonthDay object is {0}.",
      monthDay->GetXsdType() );

   // Print the value of the SoapMonthDay object.
   Console::WriteLine( L"The value of the SoapMonthDay object is {0}.",
      monthDay->Value );

   // Print the XSD type string of the SoapMonthDay class.
   Console::WriteLine( L"The XSD type of the class SoapMonthDay is {0}.",
      SoapMonthDay::XsdType );
}
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD gMonthDay to create a SoapMonthDay object.
        // Parse the representation for February 21, in the UTC+8 time zone.
        string xsdMonthDay = "--02-21+08:00";
        SoapMonthDay monthDay = SoapMonthDay.Parse(xsdMonthDay);

        // Print the monthDay in XSD format. 
        Console.WriteLine("The SoapMonthDay object in XSD format is {0}.",
            monthDay.ToString());

        // Print the XSD type string of this particular SoapMonthDay object.
        Console.WriteLine("The XSD type of the SoapMonthDay object is {0}.",
            monthDay.GetXsdType());

        // Print the value of the SoapMonthDay object.
        Console.WriteLine("The value of the SoapMonthDay object is {0}.",
            monthDay.Value);

        // Print the XSD type string of the SoapMonthDay class.
        Console.WriteLine("The XSD type of the class SoapMonthDay is {0}.",
            SoapMonthDay.XsdType);
    }
}

Remarks

For more information about XSD data types, see XML Data Types Reference.

Constructors

SoapMonthDay() SoapMonthDay() SoapMonthDay() SoapMonthDay()

Initializes a new instance of the SoapMonthDay class.

SoapMonthDay(DateTime) SoapMonthDay(DateTime) SoapMonthDay(DateTime) SoapMonthDay(DateTime)

Initializes a new instance of the SoapMonthDay class with a specified DateTime object.

Properties

Value Value Value Value

Gets or sets the date and time of the current instance.

XsdType XsdType XsdType XsdType

Gets the XML Schema definition language (XSD) of the current SOAP type.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetXsdType() GetXsdType() GetXsdType() GetXsdType()

Returns the XML Schema definition language (XSD) of the current SOAP type.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Parse(String) Parse(String) Parse(String) Parse(String)

Converts the specified String into a SoapMonthDay object.

ToString() ToString() ToString() ToString()

Returns Value as a String.

Applies to