你的位置: 码友网首页 / 资讯源列表 / Using DateOnly and TimeOnly in .NET 6

关于[Using DateOnly and TimeOnly in .NET 6]的摘要:

In .NET 6 (preview 4), two long-awaited types have been introduced as part of the core library. DateOnly and TimeOnly allow developers to represent either the date or time portion of a DateTime. These two new types are structs (value types) and may be used when your code deals with date or time concepts independently. Both types can be found in the System namespace. Using these new types may align well with how databases allow similar data to be represented. Specifically, these types align well with the SQL Server date and time data types.

原文地址: https://www.stevejgordon.co.uk/using-dateonly-and-timeonly-in-dotnet-6

收录时间: 2021-05-26 浏览量: 1358 分类: .NET 6

| 0 收藏 | 0