TimeOnly.AddMinutes Method

Definition

Overloads

AddMinutes(Double)

Returns a new TimeOnly that adds the specified number of minutes to the value of this instance.

AddMinutes(Double, Int32)

Returns a new TimeOnly that adds the specified number of minutes to the value of this instance. If the result wraps past the end of the day, this method returns the number of excess days as an out parameter.

AddMinutes(Double)

Source:
TimeOnly.cs
Source:
TimeOnly.cs
Source:
TimeOnly.cs

Returns a new TimeOnly that adds the specified number of minutes to the value of this instance.

C#
public TimeOnly AddMinutes(double value);

Parameters

value
Double

A number of whole and fractional minutes. The value parameter can be negative or positive.

Returns

An object whose value is the sum of the time represented by this instance and the number of minutes represented by value.

Applies to

.NET 10 及其他版本
產品 版本
.NET 6, 7, 8, 9, 10

AddMinutes(Double, Int32)

Source:
TimeOnly.cs
Source:
TimeOnly.cs
Source:
TimeOnly.cs

Returns a new TimeOnly that adds the specified number of minutes to the value of this instance. If the result wraps past the end of the day, this method returns the number of excess days as an out parameter.

C#
public TimeOnly AddMinutes(double value, out int wrappedDays);

Parameters

value
Double

A number of whole and fractional minutes. The value parameter can be negative or positive.

wrappedDays
Int32

When this method returns, contains the number of excess days, if any, that resulted from wrapping during this addition operation.

Returns

An object whose value is the sum of the time represented by this instance and the number of minutes represented by value.

Applies to

.NET 10 及其他版本
產品 版本
.NET 6, 7, 8, 9, 10