Modifier

Partager via


SoapDate Constructors

Definition

Initializes a new instance of the SoapDate class.

Overloads

SoapDate()

Initializes a new instance of the SoapDate class.

SoapDate(DateTime)

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

SoapDate(DateTime, Int32)

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

SoapDate()

Initializes a new instance of the SoapDate class.

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

Examples

The following code example shows how to use this constructor.

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

Applies to

SoapDate(DateTime)

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

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

Applies to

SoapDate(DateTime, Int32)

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

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

Remarks

An integer of less than 0 indicates a negative sign.

Applies to