YearMonthDuration.Subtract MethodYearMonthDuration.Subtract MethodYearMonthDuration::Subtract Method
Subtracts a YearMonthDurationYearMonthDurationYearMonthDuration value from another YearMonthDurationYearMonthDurationYearMonthDuration value.
Syntax
Public Shared Function Subtract( _ duration1 As YearMonthDuration, _ duration2 As YearMonthDuration _ ) As YearMonthDuration
public static YearMonthDuration Subtract( YearMonthDuration duration1, YearMonthDuration duration2 )
public: static YearMonthDuration Subtract( YearMonthDuration duration1, YearMonthDuration duration2 )
Parameters
- duration1
Type: XmlPrime.YearMonthDurationXmlPrime.YearMonthDurationXmlPrime::YearMonthDuration
The YearMonthDurationYearMonthDurationYearMonthDuration to subtract from.
- duration2
Type: XmlPrime.YearMonthDurationXmlPrime.YearMonthDurationXmlPrime::YearMonthDuration
The YearMonthDurationYearMonthDurationYearMonthDuration to subtract.
Return Value
Type: XmlPrime.YearMonthDurationXmlPrime.YearMonthDurationXmlPrime::YearMonthDuration
A YearMonthDurationYearMonthDurationYearMonthDuration that is the result of subtracting duration2 from duration1.
Exceptions
Exception | Condition |
OverflowExceptionOverflowExceptionOverflowException | The return value would be less than MinValueMinValueMinValue or greater than MaxValueMaxValueMaxValue. |