YearMonthDuration.Divide Method (YearMonthDuration, YearMonthDuration)YearMonthDuration.Divide Method (YearMonthDuration, YearMonthDuration)YearMonthDuration::Divide Method (YearMonthDuration, YearMonthDuration)
Divides the specified YearMonthDurationYearMonthDurationYearMonthDuration value by another YearMonthDurationYearMonthDurationYearMonthDuration value.
Syntax
Public Shared Function Divide( _ duration1 As YearMonthDuration, _ duration2 As YearMonthDuration _ ) As Decimal
public static decimal Divide( YearMonthDuration duration1, YearMonthDuration duration2 )
public: static decimal Divide( YearMonthDuration duration1, YearMonthDuration duration2 )
Parameters
- duration1
Type: XmlPrime.YearMonthDurationXmlPrime.YearMonthDurationXmlPrime::YearMonthDuration
The YearMonthDurationYearMonthDurationYearMonthDuration to divide.
- duration2
Type: XmlPrime.YearMonthDurationXmlPrime.YearMonthDurationXmlPrime::YearMonthDuration
The YearMonthDurationYearMonthDurationYearMonthDuration to divide by.
Return Value
Type: System.DecimalSystem.DecimalSystem::Decimal
The decimalDecimaldecimal result of dividing duration1 by duration2.
Exceptions
Exception | Condition |
DivideByZeroExceptionDivideByZeroExceptionDivideByZeroException | duration2 is zero. |