Freigeben über


SoapYearMonth Konstruktoren

Definition

Initialisiert eine neue Instanz der SoapYearMonth-Klasse.

Überlädt

SoapYearMonth()

Initialisiert eine neue Instanz der SoapYearMonth-Klasse.

SoapYearMonth(DateTime)

Initialisiert eine neue Instanz der SoapYearMonth-Klasse mit einem angegebenen DateTime-Objekt.

SoapYearMonth(DateTime, Int32)

Initialisiert eine neue Instanz der SoapYearMonth-Klasse mit einem angegebenen DateTime-Objekt und einer ganzen Zahl, die angibt, ob Value ein positiver oder negativer Wert ist.

SoapYearMonth()

Initialisiert eine neue Instanz der SoapYearMonth-Klasse.

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

Beispiele

Im folgenden Codebeispiel wird die Verwendung dieses Konstruktors veranschaulicht.

// 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());

Gilt für:

SoapYearMonth(DateTime)

Initialisiert eine neue Instanz der SoapYearMonth-Klasse mit einem angegebenen DateTime-Objekt.

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)

Parameter

value
DateTime

Ein DateTime-Objekt zum Initialisieren der aktuellen Instanz.

Beispiele

Im folgenden Codebeispiel wird die Verwendung dieses Konstruktors veranschaulicht.

// 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());

Gilt für:

SoapYearMonth(DateTime, Int32)

Initialisiert eine neue Instanz der SoapYearMonth-Klasse mit einem angegebenen DateTime-Objekt und einer ganzen Zahl, die angibt, ob Value ein positiver oder negativer Wert ist.

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)

Parameter

value
DateTime

Ein DateTime-Objekt zum Initialisieren der aktuellen Instanz.

sign
Int32

Eine ganze Zahl, die angibt, ob value positiv ist.

Beispiele

Im folgenden Codebeispiel wird die Verwendung dieses Konstruktors veranschaulicht.

// 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());

Hinweise

Eine ganze Zahl von kleiner als 0 gibt ein negatives signan.

Gilt für: