SoapYearMonth Constructors

Definition

Initializes a new instance of the SoapYearMonth class.

Overloads

SoapYearMonth()

Initializes a new instance of the SoapYearMonth class.

SoapYearMonth(DateTime)

Initializes a new instance of the SoapYearMonth class with a specified DateTime object.

SoapYearMonth(DateTime, Int32)

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.

SoapYearMonth()

Initializes a new instance of the SoapYearMonth class.

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

Examples

The following code example shows how to use this 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());

Applies to

SoapYearMonth(DateTime)

Initializes a new instance of the SoapYearMonth class with a specified DateTime object.

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)

Parameters

value
DateTime

A DateTime object to initialize the current instance.

Examples

The following code example shows how to use this 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());

Applies to

SoapYearMonth(DateTime, Int32)

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.

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)

Parameters

value
DateTime

A DateTime object to initialize the current instance.

sign
Int32

An integer that indicates whether value is positive.

Examples

The following code example shows how to use this 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());

Remarks

An integer of less than 0 indicates a negative sign.

Applies to