DateTime..::..AddHours Method
Returns a new DateTime that adds the specified number of hours to the value of this instance.
Namespace:
SystemAssembly: Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public DateTime AddHours( double value )
<TemplateAttribute> _ Public Function AddHours ( _ value As Double _ ) As DateTime
[TemplateAttribute] public: DateTime^ AddHours( double^ value )
Parameters
- value
- Type: System..::..Double
A number of whole and fractional hours. The value parameter can be negative or positive.
Return Value
An object whose value is the sum of the date and time represented by this instance and the number of hours represented by value.Exceptions
Exception | Condition |
---|---|
System..::..ArgumentOutOfRangeException | The resulting DateTime is less than MinValue or greater than MaxValue. |