Freigeben über


SoapTime Klasse

Definition

Umschließt einen XSD-time-Typ.

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

Beispiele

Im folgenden Codebeispiel wird die Verwendung der SoapTime Klasse veranschaulicht, um einen XSD-Typ time umzuschließen.

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

int main()
{
   // Parse an XSD gTime to create a SoapTime object.
   // The timezone of this object is the current timezone.
   String^ xsdTime = "12:13:14.123Z";
   SoapTime^ time = SoapTime::Parse( xsdTime );

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

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

   // Display the value of the SoapTime object.
   Console::WriteLine( "The value of the SoapTime instance is {0}.",
      time->Value );

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

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD gTime to create a SoapTime object.
        // The time zone of this object is the current time zone.
        string xsdTime = "12:13:14.123Z";
        SoapTime time = SoapTime.Parse(xsdTime);

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

        // Display the XSD type string of this particular SoapTime object.
        Console.WriteLine("The XSD type of the SoapTime object is {0}.",
            time.GetXsdType());

        // Display the value of the SoapTime object.
        Console.WriteLine("The value of the SoapTime object is {0}.",
            time.Value);

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

Hinweise

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

Konstruktoren

SoapTime()

Initialisiert eine neue Instanz der SoapTime-Klasse.

SoapTime(DateTime)

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

ToString()

Gibt Value als String zurück.

Gilt für