TimeOnly.ToTimeSpan Method

Definition

Convert the current TimeOnly instance to a TimeSpan object.

C#
public TimeSpan ToTimeSpan();

Returns

A TimeSpan object spanning to the time specified in the current TimeOnly instance.

Applies to

Product Versions
.NET 6, 7, 8, 9