SoapYearMonth Classe

Definição

Encapsula um tipo gYearMonth XSD.Wraps an XSD gYearMonth type.

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
Herança
SoapYearMonth
Atributos
Implementações

Exemplos

O exemplo de código a seguir demonstra SoapYearMonth como usar a classe para encapsular o gYearMonth tipo XSD.The following code example demonstrates using the SoapYearMonth class to wrap the XSD gYearMonth type.

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

Comentários

Para obter mais informações sobre tipos de dados XSD, consulte referência de tipos de dados XML.For more information about XSD data types, see XML Data Types Reference.

Construtores

SoapYearMonth()

Inicializa uma nova instância da classe SoapYearMonth.Initializes a new instance of the SoapYearMonth class.

SoapYearMonth(DateTime)

Inicializa uma nova instância da classe SoapYearMonth com um objeto DateTime especificado.Initializes a new instance of the SoapYearMonth class with a specified DateTime object.

SoapYearMonth(DateTime, Int32)

Inicializa uma nova instância da classe SoapYearMonth com um objeto DateTime especificado e um inteiro que indica se Value é um valor positivo ou negativo.Initializes a new instance of the SoapYearMonth class with a specified DateTime object and an integer that indicates whether Value is a positive or negative value.

Propriedades

Sign

Obtém ou define se a data e hora da instância atual é positiva ou negativa.Gets or sets whether the date and time of the current instance is positive or negative.

Value

Obtém ou define a data e hora da instância atual.Gets or sets the date and time of the current instance.

XsdType

Obtém a XSD (linguagem de definição de esquema XML) do tipo SOAP atual.Gets the XML Schema definition language (XSD) of the current SOAP type.

Métodos

Equals(Object)

Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object.

(Herdado de Object)
GetHashCode()

Serve como a função de hash padrão.Serves as the default hash function.

(Herdado de Object)
GetType()

Obtém o Type da instância atual.Gets the Type of the current instance.

(Herdado de Object)
GetXsdType()

Retorna a XSD (linguagem de definição de esquema XML) do tipo SOAP atual.Returns the XML Schema definition language (XSD) of the current SOAP type.

MemberwiseClone()

Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object.

(Herdado de Object)
Parse(String)

Converte o String especificado em um objeto SoapYearMonth.Converts the specified String into a SoapYearMonth object.

ToString()

Retorna um Value como um String.Returns a Value as a String.

Aplica-se a