SoapYearMonth Clase

Definición

Ajusta un tipo XSD gYearMonth.

public ref class SoapYearMonth sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Serializable]
public sealed class SoapYearMonth : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapYearMonth : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[<System.Serializable>]
type SoapYearMonth = class
    interface ISoapXsd
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapYearMonth = class
    interface ISoapXsd
Public NotInheritable Class SoapYearMonth
Implements ISoapXsd
Herencia
SoapYearMonth
Atributos
Implementaciones

Ejemplos

En el ejemplo de código siguiente se muestra el uso de la SoapYearMonth clase para encapsular el tipo XSD gYearMonth .

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

int main()
{
   // Parse an XSD gYearMonth to create a SoapYearMonth object.
   // The timezone of this object is -08:00.
   String^ xsdYearMonth = "2003-11-08:00";
   SoapYearMonth^ yearMonth = SoapYearMonth::Parse( xsdYearMonth );

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

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

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

   // Display the sign of the SoapYearMonth object.
   Console::WriteLine( "The sign of the SoapYearMonth instance is {0}.",
      yearMonth->Sign );

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

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD gYearMonth to create a SoapYearMonth object.
        // The time zone of this object is -08:00.
        string xsdYearMonth = "2003-11-08:00";
        SoapYearMonth yearMonth = SoapYearMonth.Parse(xsdYearMonth);

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

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

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

        // Display the sign of the SoapYearMonth object.
        Console.WriteLine("The sign of the SoapYearMonth object is {0}.",
            yearMonth.Sign);

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

Comentarios

Para obtener más información sobre los tipos de datos XSD, vea Referencia de tipos de datos XML.

Constructores

SoapYearMonth()

Inicializa una nueva instancia de la clase SoapYearMonth.

SoapYearMonth(DateTime)

Inicializa una nueva instancia de la clase SoapYearMonth con el objeto DateTime especificado.

SoapYearMonth(DateTime, Int32)

Inicializa una nueva instancia de la clase SoapYearMonth con el objeto DateTime especificado y un entero que indica si Value es un valor positivo o negativo.

Propiedades

Sign

Obtiene o establece si la fecha y la hora de la instancia actual es positiva o negativa.

Value

Obtiene o establece la fecha y la hora de la instancia actual.

XsdType

Obtiene el lenguaje de definición de esquemas XML (XSD) del tipo SOAP actual.

Métodos

Equals(Object)

Determina si el objeto especificado es igual que el objeto actual.

(Heredado de Object)
GetHashCode()

Sirve como la función hash predeterminada.

(Heredado de Object)
GetType()

Obtiene el Type de la instancia actual.

(Heredado de Object)
GetXsdType()

Devuelve el lenguaje de definición de esquemas XML (XSD) del tipo SOAP actual.

MemberwiseClone()

Crea una copia superficial del Object actual.

(Heredado de Object)
Parse(String)

Convierte el objeto String especificado en un objeto SoapYearMonth.

ToString()

Devuelve Value como un String.

Se aplica a