Freigeben über


SoapMonthDay Klasse

Definition

Umschließt einen XSD-gMonthDay-Typ.

public ref class SoapMonthDay sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Serializable]
public sealed class SoapMonthDay : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapMonthDay : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[<System.Serializable>]
type SoapMonthDay = class
    interface ISoapXsd
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapMonthDay = class
    interface ISoapXsd
Public NotInheritable Class SoapMonthDay
Implements ISoapXsd
Vererbung
SoapMonthDay
Attribute
Implementiert

Beispiele

Im folgenden Codebeispiel wird gezeigt, wie die Elemente in der SoapMonthDay Klasse verwendet werden, um zwischen einem Objekt und einer SoapMonthDay XSD-Zeichenfolge gMonthDay zu konvertieren.

#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);
    }
}

Hinweise

Weitere Informationen zu XSD-Datentypen finden Sie unter XML-Datentypenreferenz.

Konstruktoren

SoapMonthDay()

Initialisiert eine neue Instanz der SoapMonthDay-Klasse.

SoapMonthDay(DateTime)

Initialisiert eine neue Instanz der SoapMonthDay-Klasse mit einem angegebenen DateTime-Objekt.

Eigenschaften

Value

Ruft das Datum und die Uhrzeit der aktuellen Instanz ab oder legt diese fest.

XsdType

Ruft die XSD (XML Schema Definition) des aktuellen SOAP-Typs ab.

Methoden

Equals(Object)

Bestimmt, ob das angegebene Objekt gleich dem aktuellen Objekt ist.

(Geerbt von Object)
GetHashCode()

Fungiert als Standardhashfunktion.

(Geerbt von Object)
GetType()

Ruft den Type der aktuellen Instanz ab.

(Geerbt von Object)
GetXsdType()

Gibt die XSD (XML Schema Definition) des aktuellen SOAP-Typs zurück.

MemberwiseClone()

Erstellt eine flache Kopie des aktuellen Object.

(Geerbt von Object)
Parse(String)

Konvertiert den angegebenen String in ein SoapMonthDay-Objekt.

ToString()

Gibt Value als String zurück.

Gilt für