Compartir a través de


SoapYearMonth Constructores

Definición

Inicializa una nueva instancia de la clase SoapYearMonth.

Sobrecargas

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.

SoapYearMonth()

Inicializa una nueva instancia de la clase SoapYearMonth.

public:
 SoapYearMonth();
public SoapYearMonth ();
Public Sub New ()

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar este constructor.

// Create a SoapYearMonth object.
SoapYearMonth^ year = gcnew SoapYearMonth;
year->Value = DateTime::Now;
Console::WriteLine( "The year is {0}.", year );
// Create a SoapYearMonth object.
SoapYearMonth yearMonth = new SoapYearMonth();
yearMonth.Value = DateTime.Now;
Console.WriteLine("The yearMonth is {0}.", yearMonth.ToString());

Se aplica a

SoapYearMonth(DateTime)

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

public:
 SoapYearMonth(DateTime value);
public SoapYearMonth (DateTime value);
new System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth : DateTime -> System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth
Public Sub New (value As DateTime)

Parámetros

value
DateTime

Objeto DateTime que va a inicializar la instancia actual.

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar este constructor.

// Create a SoapYearMonth object.
SoapYearMonth^ year = gcnew SoapYearMonth( DateTime::Now );
Console::WriteLine( "The year is {0}.", year );
// Create a SoapYearMonth object.
SoapYearMonth yearMonth = new SoapYearMonth(DateTime.Now);
Console.WriteLine("The yearMonth is {0}.", yearMonth.ToString());

Se aplica a

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.

public:
 SoapYearMonth(DateTime value, int sign);
public SoapYearMonth (DateTime value, int sign);
new System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth : DateTime * int -> System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth
Public Sub New (value As DateTime, sign As Integer)

Parámetros

value
DateTime

Objeto DateTime que va a inicializar la instancia actual.

sign
Int32

Número entero que indica si el valor del parámetro value es positivo.

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar este constructor.

// Create a SoapYearMonth object with a positive sign.
SoapYearMonth^ year = gcnew SoapYearMonth( DateTime::Now,1 );
Console::WriteLine( "The year is {0}.", year );
// Create a SoapYearMonth object with a positive sign.
SoapYearMonth yearMonth = new SoapYearMonth(DateTime.Now, 1);
Console.WriteLine("The yearMonth is {0}.", yearMonth.ToString());

Comentarios

Un entero de menos de 0 indica un valor negativo sign.

Se aplica a