Freigeben über


SoapMonth Klasse

Definition

Umschließt einen XSD-gMonth-Typ.

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

Beispiele

Das folgende Codebeispiel zeigt, wie die Member in der SoapMonth Klasse zum Konvertieren zwischen einem SoapMonth Objekt und einer XSD-Zeichenfolge gMonth verwendet werden.

using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;

int main()
{
   // Parse an XSD gMonth to create a SoapMonth object.
   // The timezone of this object is +08:00.
   String^ xsdMonth = "--02--+08:00";
   SoapMonth^ month = SoapMonth::Parse( xsdMonth );

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

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

   // Print the value of the SoapMonth object.
   Console::WriteLine( "The value of the SoapMonth instance is {0}.",
      month->Value );

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

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD gMonth to create a SoapMonth object.
        // The time zone of this object is +08:00.
        string xsdMonth = "--02--+08:00";
        SoapMonth month = SoapMonth.Parse(xsdMonth);

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

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

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

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

Hinweise

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

Konstruktoren

SoapMonth()

Initialisiert eine neue Instanz der SoapMonth-Klasse.

SoapMonth(DateTime)

Initialisiert eine neue Instanz der SoapMonth-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 SoapMonth-Objekt.

ToString()

Gibt Value als String zurück.

Gilt für