SoapDay 构造函数

定义

初始化 SoapDay 类的新实例。

重载

SoapDay()

初始化 SoapDay 类的新实例。

SoapDay(DateTime)

用指定的 SoapDay 对象初始化 DateTime 类的新实例。

SoapDay()

初始化 SoapDay 类的新实例。

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

示例

下面的代码示例演示如何使用此构造函数。

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

适用于

SoapDay(DateTime)

用指定的 SoapDay 对象初始化 DateTime 类的新实例。

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

参数

value
DateTime

用于初始化当前实例的 DateTime 对象。

示例

下面的代码示例演示如何使用此构造函数。

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

适用于