DateTime.Deconstruct 方法

定义

重载

Deconstruct(DateOnly, TimeOnly)

通过 DateOnlyTimeOnly解构此DateTime实例。

Deconstruct(Int32, Int32, Int32)

YearMonthDay解构此DateOnly实例。

Deconstruct(DateOnly, TimeOnly)

通过 DateOnlyTimeOnly解构此DateTime实例。

public:
 void Deconstruct([Runtime::InteropServices::Out] DateOnly % date, [Runtime::InteropServices::Out] TimeOnly % time);
public void Deconstruct (out DateOnly date, out TimeOnly time);
member this.Deconstruct : DateOnly * TimeOnly -> unit
Public Sub Deconstruct (ByRef date As DateOnly, ByRef time As TimeOnly)

参数

date
DateOnly

此方法返回时, 表示 DateOnlyDateTime 实例的值。

time
TimeOnly

此方法返回时, 表示 TimeOnlyDateTime 实例的值。

适用于

Deconstruct(Int32, Int32, Int32)

YearMonthDay解构此DateOnly实例。

public:
 void Deconstruct([Runtime::InteropServices::Out] int % year, [Runtime::InteropServices::Out] int % month, [Runtime::InteropServices::Out] int % day);
public void Deconstruct (out int year, out int month, out int day);
member this.Deconstruct : int * int * int -> unit
Public Sub Deconstruct (ByRef year As Integer, ByRef month As Integer, ByRef day As Integer)

参数

year
Int32

此方法返回时, 表示 YearDateTime 实例的值。

month
Int32

此方法返回时, 表示 MonthDateTime 实例的值。

day
Int32

此方法返回时, 表示 DayDateTime 实例的值。

适用于