DateTime.Deconstruct Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deconstruct(DateOnly, TimeOnly) |
Deconstructs this DateTime instance by DateOnly and TimeOnly. |
Deconstruct(Int32, Int32, Int32) |
Deconstructs this DateOnly instance by Year, Month, and Day. |
- Source:
- DateTime.cs
- Source:
- DateTime.cs
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)
Parameters
Applies to
.NET 9 and .NET 8
Product | Versions |
---|---|
.NET | 8, 9 |
- Source:
- DateTime.cs
- Source:
- DateTime.cs
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)
Parameters
Applies to
.NET 9 and .NET 8
Product | Versions |
---|---|
.NET | 8, 9 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: