SoapYear Constructors

Definition

Initializes a new instance of the SoapYear class.

Overloads

SoapYear()

Initializes a new instance of the SoapYear class.

SoapYear(DateTime)

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

SoapYear(DateTime, Int32)

Initializes a new instance of the SoapYear class with a specified DateTime object and an integer that indicates whether Value is a positive or negative value.

SoapYear()

Initializes a new instance of the SoapYear class.

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

Examples

The following code example shows how to use this constructor.

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

Applies to

SoapYear(DateTime)

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

public:
 SoapYear(DateTime value);
public SoapYear (DateTime value);
new System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear : DateTime -> System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear
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 SoapYear object.
SoapYear^ date = gcnew SoapYear( DateTime::Now );
Console::WriteLine( "The date is {0}.", date );
// Create a SoapYear object.
SoapYear year = new SoapYear(DateTime.Now);
Console.WriteLine("The year is {0}.", year.ToString());

Applies to

SoapYear(DateTime, Int32)

Initializes a new instance of the SoapYear class with a specified DateTime object and an integer that indicates whether Value is a positive or negative value.

public:
 SoapYear(DateTime value, int sign);
public SoapYear (DateTime value, int sign);
new System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear : DateTime * int -> System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear
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 SoapYear object with a positive sign.
SoapYear^ date = gcnew SoapYear( DateTime::Now,1 );
Console::WriteLine( "The date is {0}.", date );
// Create a SoapYear object with a positive sign.
SoapYear year = new SoapYear(DateTime.Now, 1);
Console.WriteLine("The year is {0}.", year.ToString());

Applies to