TYPE
TimeOnly
Represents a time of day without a date. Available from .NET 6.
Formal Syntax & Structure
csharp syntaxcsharp
new TimeOnly(hour, minute)Working Example
Example Snippetcsharp
var opening = new System.TimeOnly(9, 30);Represents a time of day without a date. Available from .NET 6.
new TimeOnly(hour, minute)var opening = new System.TimeOnly(9, 30);