Class ExtensionMethodsTimeSpan
Provides a set of extension methods dedicated to TimeSpan.
public static class ExtensionMethodsTimeSpan
- Inheritance
-
ExtensionMethodsTimeSpan
- Inherited Members
Methods (112)
ToDays(byte)
Gets a TimeSpan value, with total number of days equals to nbDays.
public static TimeSpan ToDays(this byte nbDays)
Parameters
nbDaysbyteThe number of days.
Returns
ToDays(decimal)
Gets a TimeSpan value, with total floating number of days equals to floating value nbDaysDecimal.
public static TimeSpan ToDays(this decimal nbDaysDecimal)
Parameters
nbDaysDecimaldecimalThe number of days.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(double)
Gets a TimeSpan value, with total double number of days equals to double value nbDaysDouble.
public static TimeSpan ToDays(this double nbDaysDouble)
Parameters
nbDaysDoubledoubleThe number of days.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(short)
Gets a TimeSpan value, with total number of days equals to nbDays.
public static TimeSpan ToDays(this short nbDays)
Parameters
nbDaysshortThe number of days.
Returns
ToDays(int)
Gets a TimeSpan value, with total number of days equals to nbDays.
public static TimeSpan ToDays(this int nbDays)
Parameters
nbDaysintThe number of days.
Returns
Exceptions
- ArgumentOutOfRangeException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(long)
Gets a TimeSpan value, with total number of days equals to nbDays.
public static TimeSpan ToDays(this long nbDays)
Parameters
nbDayslongThe number of days.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(byte?)
Gets a TimeSpan value, with total number of days equals to nullableNbDays.
public static TimeSpan ToDays(this byte? nullableNbDays)
Parameters
nullableNbDaysbyte?The number of days.
Returns
Remarks
ToDays(decimal?)
Gets a TimeSpan value, with total floating number of days equals to floating value nullableNbDaysDecimal.
public static TimeSpan ToDays(this decimal? nullableNbDaysDecimal)
Parameters
nullableNbDaysDecimaldecimal?The number of days.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(double?)
Gets a TimeSpan value, with total floating number of days equals to floating value nullableNbDaysDouble.
public static TimeSpan ToDays(this double? nullableNbDaysDouble)
Parameters
nullableNbDaysDoubledouble?The number of days.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(short?)
Gets a TimeSpan value, with total number of days equals to nullableNbDays.
public static TimeSpan ToDays(this short? nullableNbDays)
Parameters
nullableNbDaysshort?The number of days.
Returns
Remarks
ToDays(int?)
Gets a TimeSpan value, with total number of days equals to nullableNbDays.
public static TimeSpan ToDays(this int? nullableNbDays)
Parameters
nullableNbDaysint?The number of days.
Returns
Remarks
Exceptions
- ArgumentOutOfRangeException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(long?)
Gets a TimeSpan value, with total number of days equals to nullableNbDays.
public static TimeSpan ToDays(this long? nullableNbDays)
Parameters
nullableNbDayslong?The number of days.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(sbyte?)
Gets a TimeSpan value, with total number of days equals to nullableNbDays.
public static TimeSpan ToDays(this sbyte? nullableNbDays)
Parameters
nullableNbDayssbyte?The number of days.
Returns
Remarks
ToDays(float?)
Gets a TimeSpan value, with total floating number of days equals to floating value nullableNbDaysFloat.
public static TimeSpan ToDays(this float? nullableNbDaysFloat)
Parameters
nullableNbDaysFloatfloat?The number of days.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(ushort?)
Gets a TimeSpan value, with total number of days equals to nullableNbDays.
public static TimeSpan ToDays(this ushort? nullableNbDays)
Parameters
nullableNbDaysushort?The number of days.
Returns
Remarks
ToDays(uint?)
Gets a TimeSpan value, with total number of days equals to nullableNbDays.
public static TimeSpan ToDays(this uint? nullableNbDays)
Parameters
nullableNbDaysuint?The number of days.
Returns
Remarks
Exceptions
- ArgumentOutOfRangeException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(ulong?)
Gets a TimeSpan value, with total number of days equals to nullableNbDays.
public static TimeSpan ToDays(this ulong? nullableNbDays)
Parameters
nullableNbDaysulong?The number of days.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue.
ToDays(sbyte)
Gets a TimeSpan value, with total number of days equals to nbDays.
public static TimeSpan ToDays(this sbyte nbDays)
Parameters
nbDayssbyteThe number of days.
Returns
ToDays(float)
Gets a TimeSpan value, with total floating number of days equals to floating value nbDaysFloat.
public static TimeSpan ToDays(this float nbDaysFloat)
Parameters
nbDaysFloatfloatThe number of days.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(ushort)
Gets a TimeSpan value, with total number of days equals to nbDays.
public static TimeSpan ToDays(this ushort nbDays)
Parameters
nbDaysushortThe number of days.
Returns
ToDays(uint)
Gets a TimeSpan value, with total number of days equals to nbDays.
public static TimeSpan ToDays(this uint nbDays)
Parameters
nbDaysuintThe number of days.
Returns
Exceptions
- ArgumentOutOfRangeException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToDays(ulong)
Gets a TimeSpan value, with total number of days equals to nbDays.
public static TimeSpan ToDays(this ulong nbDays)
Parameters
nbDaysulongThe number of days.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue.
ToHours(byte)
Gets a TimeSpan value, with total number of hours equals to nbHours.
public static TimeSpan ToHours(this byte nbHours)
Parameters
nbHoursbyteThe number of hours.
Returns
ToHours(decimal)
Gets a TimeSpan value, with total floating number of hours equals to floating value nbHoursDecimal.
public static TimeSpan ToHours(this decimal nbHoursDecimal)
Parameters
nbHoursDecimaldecimalThe number of hours.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(double)
Gets a TimeSpan value, with total double number of hours equals to double value nbHoursDouble.
public static TimeSpan ToHours(this double nbHoursDouble)
Parameters
nbHoursDoubledoubleThe number of hours.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(short)
Gets a TimeSpan value, with total number of hours equals to nbHours.
public static TimeSpan ToHours(this short nbHours)
Parameters
nbHoursshortThe number of hours.
Returns
ToHours(int)
Gets a TimeSpan value, with total number of hours equals to nbHours.
public static TimeSpan ToHours(this int nbHours)
Parameters
nbHoursintThe number of hours.
Returns
Exceptions
- ArgumentOutOfRangeException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(long)
Gets a TimeSpan value, with total number of hours equals to nbHours.
public static TimeSpan ToHours(this long nbHours)
Parameters
nbHourslongThe number of hours.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(byte?)
Gets a TimeSpan value, with total number of hours equals to nullableNbHours.
public static TimeSpan ToHours(this byte? nullableNbHours)
Parameters
nullableNbHoursbyte?The number of hours.
Returns
Remarks
ToHours(decimal?)
Gets a TimeSpan value, with total floating number of hours equals to floating value nullableNbHoursDecimal.
public static TimeSpan ToHours(this decimal? nullableNbHoursDecimal)
Parameters
nullableNbHoursDecimaldecimal?The number of hours.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(double?)
Gets a TimeSpan value, with total floating number of hours equals to floating value nullableNbHoursDouble.
public static TimeSpan ToHours(this double? nullableNbHoursDouble)
Parameters
nullableNbHoursDoubledouble?The number of hours.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(short?)
Gets a TimeSpan value, with total number of hours equals to nullableNbHours.
public static TimeSpan ToHours(this short? nullableNbHours)
Parameters
nullableNbHoursshort?The number of hours.
Returns
Remarks
ToHours(int?)
Gets a TimeSpan value, with total number of hours equals to nullableNbHours.
public static TimeSpan ToHours(this int? nullableNbHours)
Parameters
nullableNbHoursint?The number of hours.
Returns
Remarks
Exceptions
- ArgumentOutOfRangeException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(long?)
Gets a TimeSpan value, with total number of hours equals to nullableNbHours.
public static TimeSpan ToHours(this long? nullableNbHours)
Parameters
nullableNbHourslong?The number of hours.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(sbyte?)
Gets a TimeSpan value, with total number of hours equals to nullableNbHours.
public static TimeSpan ToHours(this sbyte? nullableNbHours)
Parameters
nullableNbHourssbyte?The number of hours.
Returns
Remarks
ToHours(float?)
Gets a TimeSpan value, with total floating number of hours equals to floating value nullableNbHoursFloat.
public static TimeSpan ToHours(this float? nullableNbHoursFloat)
Parameters
nullableNbHoursFloatfloat?The number of hours.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(ushort?)
Gets a TimeSpan value, with total number of hours equals to nullableNbHours.
public static TimeSpan ToHours(this ushort? nullableNbHours)
Parameters
nullableNbHoursushort?The number of hours.
Returns
Remarks
ToHours(uint?)
Gets a TimeSpan value, with total number of hours equals to nullableNbHours.
public static TimeSpan ToHours(this uint? nullableNbHours)
Parameters
nullableNbHoursuint?The number of hours.
Returns
Remarks
Exceptions
- ArgumentOutOfRangeException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(ulong?)
Gets a TimeSpan value, with total number of hours equals to nullableNbHours.
public static TimeSpan ToHours(this ulong? nullableNbHours)
Parameters
nullableNbHoursulong?The number of hours.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue.
ToHours(sbyte)
Gets a TimeSpan value, with total number of hours equals to nbHours.
public static TimeSpan ToHours(this sbyte nbHours)
Parameters
nbHourssbyteThe number of hours.
Returns
ToHours(float)
Gets a TimeSpan value, with total floating number of hours equals to floating value nbHoursFloat.
public static TimeSpan ToHours(this float nbHoursFloat)
Parameters
nbHoursFloatfloatThe number of hours.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(ushort)
Gets a TimeSpan value, with total number of hours equals to nbHours.
public static TimeSpan ToHours(this ushort nbHours)
Parameters
nbHoursushortThe number of hours.
Returns
ToHours(uint)
Gets a TimeSpan value, with total number of hours equals to nbHours.
public static TimeSpan ToHours(this uint nbHours)
Parameters
nbHoursuintThe number of hours.
Returns
Exceptions
- ArgumentOutOfRangeException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToHours(ulong)
Gets a TimeSpan value, with total number of hours equals to nbHours.
public static TimeSpan ToHours(this ulong nbHours)
Parameters
nbHoursulongThe number of hours.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue.
ToMilliseconds(byte)
Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.
public static TimeSpan ToMilliseconds(this byte nbMilliseconds)
Parameters
nbMillisecondsbyteThe number of milli-seconds.
Returns
ToMilliseconds(decimal)
Gets a TimeSpan value, with total floating number of milli-seconds equals to floating value nbMillisecondsDecimal.
public static TimeSpan ToMilliseconds(this decimal nbMillisecondsDecimal)
Parameters
nbMillisecondsDecimaldecimalThe number of milli-seconds.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMilliseconds(double)
Gets a TimeSpan value, with total double number of milli-seconds equals to double value nbMillisecondsDouble.
public static TimeSpan ToMilliseconds(this double nbMillisecondsDouble)
Parameters
nbMillisecondsDoubledoubleThe number of milli-seconds.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMilliseconds(short)
Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.
public static TimeSpan ToMilliseconds(this short nbMilliseconds)
Parameters
nbMillisecondsshortThe number of milli-seconds.
Returns
ToMilliseconds(int)
Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.
public static TimeSpan ToMilliseconds(this int nbMilliseconds)
Parameters
nbMillisecondsintThe number of milli-seconds.
Returns
ToMilliseconds(long)
Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.
public static TimeSpan ToMilliseconds(this long nbMilliseconds)
Parameters
nbMillisecondslongThe number of milli-seconds.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMilliseconds(byte?)
Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.
public static TimeSpan ToMilliseconds(this byte? nullableNbMilliseconds)
Parameters
nullableNbMillisecondsbyte?The number of milli-seconds.
Returns
Remarks
ToMilliseconds(decimal?)
Gets a TimeSpan value, with total floating number of milli-seconds equals to floating value nullableNbMillisecondsDecimal.
public static TimeSpan ToMilliseconds(this decimal? nullableNbMillisecondsDecimal)
Parameters
nullableNbMillisecondsDecimaldecimal?The number of milli-seconds.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMilliseconds(double?)
Gets a TimeSpan value, with total floating number of milli-seconds equals to floating value nullableNbMillisecondsDouble.
public static TimeSpan ToMilliseconds(this double? nullableNbMillisecondsDouble)
Parameters
nullableNbMillisecondsDoubledouble?The number of milli-seconds.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMilliseconds(short?)
Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.
public static TimeSpan ToMilliseconds(this short? nullableNbMilliseconds)
Parameters
nullableNbMillisecondsshort?The number of milli-seconds.
Returns
Remarks
ToMilliseconds(int?)
Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.
public static TimeSpan ToMilliseconds(this int? nullableNbMilliseconds)
Parameters
nullableNbMillisecondsint?The number of milli-seconds.
Returns
Remarks
ToMilliseconds(long?)
Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.
public static TimeSpan ToMilliseconds(this long? nullableNbMilliseconds)
Parameters
nullableNbMillisecondslong?The number of milli-seconds.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMilliseconds(sbyte?)
Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.
public static TimeSpan ToMilliseconds(this sbyte? nullableNbMilliseconds)
Parameters
nullableNbMillisecondssbyte?The number of milli-seconds.
Returns
Remarks
ToMilliseconds(float?)
Gets a TimeSpan value, with total floating number of milli-seconds equals to floating value nullableNbMillisecondsFloat.
public static TimeSpan ToMilliseconds(this float? nullableNbMillisecondsFloat)
Parameters
nullableNbMillisecondsFloatfloat?The number of milli-seconds.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMilliseconds(ushort?)
Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.
public static TimeSpan ToMilliseconds(this ushort? nullableNbMilliseconds)
Parameters
nullableNbMillisecondsushort?The number of milli-seconds.
Returns
Remarks
ToMilliseconds(uint?)
Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.
public static TimeSpan ToMilliseconds(this uint? nullableNbMilliseconds)
Parameters
nullableNbMillisecondsuint?The number of milli-seconds.
Returns
Remarks
ToMilliseconds(ulong?)
Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.
public static TimeSpan ToMilliseconds(this ulong? nullableNbMilliseconds)
Parameters
nullableNbMillisecondsulong?The number of milli-seconds.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue.
ToMilliseconds(sbyte)
Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.
public static TimeSpan ToMilliseconds(this sbyte nbMilliseconds)
Parameters
nbMillisecondssbyteThe number of milli-seconds.
Returns
ToMilliseconds(float)
Gets a TimeSpan value, with total floating number of milli-seconds equals to floating value nbMillisecondsFloat.
public static TimeSpan ToMilliseconds(this float nbMillisecondsFloat)
Parameters
nbMillisecondsFloatfloatThe number of milli-seconds.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMilliseconds(ushort)
Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.
public static TimeSpan ToMilliseconds(this ushort nbMilliseconds)
Parameters
nbMillisecondsushortThe number of milli-seconds.
Returns
ToMilliseconds(uint)
Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.
public static TimeSpan ToMilliseconds(this uint nbMilliseconds)
Parameters
nbMillisecondsuintThe number of milli-seconds.
Returns
ToMilliseconds(ulong)
Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.
public static TimeSpan ToMilliseconds(this ulong nbMilliseconds)
Parameters
nbMillisecondsulongThe number of milli-seconds.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue.
ToMinutes(byte)
Gets a TimeSpan value, with total number of minutes equals to nbMinutes.
public static TimeSpan ToMinutes(this byte nbMinutes)
Parameters
nbMinutesbyteThe number of minutes.
Returns
ToMinutes(decimal)
Gets a TimeSpan value, with total floating number of minutes equals to floating value nbMinutesDecimal.
public static TimeSpan ToMinutes(this decimal nbMinutesDecimal)
Parameters
nbMinutesDecimaldecimalThe number of minutes.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMinutes(double)
Gets a TimeSpan value, with total double number of minutes equals to double value nbMinutesDouble.
public static TimeSpan ToMinutes(this double nbMinutesDouble)
Parameters
nbMinutesDoubledoubleThe number of minutes.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMinutes(short)
Gets a TimeSpan value, with total number of minutes equals to nbMinutes.
public static TimeSpan ToMinutes(this short nbMinutes)
Parameters
nbMinutesshortThe number of minutes.
Returns
ToMinutes(int)
Gets a TimeSpan value, with total number of minutes equals to nbMinutes.
public static TimeSpan ToMinutes(this int nbMinutes)
Parameters
nbMinutesintThe number of minutes.
Returns
ToMinutes(long)
Gets a TimeSpan value, with total number of minutes equals to nbMinutes.
public static TimeSpan ToMinutes(this long nbMinutes)
Parameters
nbMinuteslongThe number of minutes.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMinutes(byte?)
Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes.
nullableNbMinutes is null, TimeSpan.Zero is returned.
public static TimeSpan ToMinutes(this byte? nullableNbMinutes)
Parameters
nullableNbMinutesbyte?The number of minutes.
Returns
ToMinutes(decimal?)
Gets a TimeSpan value, with total floating number of minutes equals to floating value nullableNbMinutesDecimal.
public static TimeSpan ToMinutes(this decimal? nullableNbMinutesDecimal)
Parameters
nullableNbMinutesDecimaldecimal?The number of minutes.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMinutes(double?)
Gets a TimeSpan value, with total floating number of minutes equals to floating value nullableNbMinutesDouble.
public static TimeSpan ToMinutes(this double? nullableNbMinutesDouble)
Parameters
nullableNbMinutesDoubledouble?The number of minutes.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMinutes(short?)
Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes.
nullableNbMinutes is null, TimeSpan.Zero is returned.
public static TimeSpan ToMinutes(this short? nullableNbMinutes)
Parameters
nullableNbMinutesshort?The number of minutes.
Returns
ToMinutes(int?)
Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes.
nullableNbMinutes is null, TimeSpan.Zero is returned.
public static TimeSpan ToMinutes(this int? nullableNbMinutes)
Parameters
nullableNbMinutesint?The number of minutes.
Returns
ToMinutes(long?)
Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes.
nullableNbMinutes is null, TimeSpan.Zero is returned.
public static TimeSpan ToMinutes(this long? nullableNbMinutes)
Parameters
nullableNbMinuteslong?The number of minutes.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMinutes(sbyte?)
Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes.
nullableNbMinutes is null, TimeSpan.Zero is returned.
public static TimeSpan ToMinutes(this sbyte? nullableNbMinutes)
Parameters
nullableNbMinutessbyte?The number of minutes.
Returns
ToMinutes(float?)
Gets a TimeSpan value, with total floating number of minutes equals to floating value nullableNbMinutesFloat.
public static TimeSpan ToMinutes(this float? nullableNbMinutesFloat)
Parameters
nullableNbMinutesFloatfloat?The number of minutes.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMinutes(ushort?)
Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes.
nullableNbMinutes is null, TimeSpan.Zero is returned.
public static TimeSpan ToMinutes(this ushort? nullableNbMinutes)
Parameters
nullableNbMinutesushort?The number of minutes.
Returns
ToMinutes(uint?)
Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes.
nullableNbMinutes is null, TimeSpan.Zero is returned.
public static TimeSpan ToMinutes(this uint? nullableNbMinutes)
Parameters
nullableNbMinutesuint?The number of minutes.
Returns
ToMinutes(ulong?)
Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes.
nullableNbMinutes is null, TimeSpan.Zero is returned.
public static TimeSpan ToMinutes(this ulong? nullableNbMinutes)
Parameters
nullableNbMinutesulong?The number of minutes.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue.
ToMinutes(sbyte)
Gets a TimeSpan value, with total number of minutes equals to nbMinutes.
public static TimeSpan ToMinutes(this sbyte nbMinutes)
Parameters
nbMinutessbyteThe number of minutes.
Returns
ToMinutes(float)
Gets a TimeSpan value, with total floating number of minutes equals to floating value nbMinutesFloat.
public static TimeSpan ToMinutes(this float nbMinutesFloat)
Parameters
nbMinutesFloatfloatThe number of minutes.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToMinutes(ushort)
Gets a TimeSpan value, with total number of minutes equals to nbMinutes.
public static TimeSpan ToMinutes(this ushort nbMinutes)
Parameters
nbMinutesushortThe number of minutes.
Returns
ToMinutes(uint)
Gets a TimeSpan value, with total number of minutes equals to nbMinutes.
public static TimeSpan ToMinutes(this uint nbMinutes)
Parameters
nbMinutesuintThe number of minutes.
Returns
ToMinutes(ulong)
Gets a TimeSpan value, with total number of minutes equals to nbMinutes.
public static TimeSpan ToMinutes(this ulong nbMinutes)
Parameters
nbMinutesulongThe number of minutes.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue.
ToSeconds(byte)
Gets a TimeSpan value, with total number of seconds equals to nbSeconds.
public static TimeSpan ToSeconds(this byte nbSeconds)
Parameters
nbSecondsbyteThe number of seconds.
Returns
ToSeconds(decimal)
Gets a TimeSpan value, with total floating number of seconds equals to floating value nbSecondsDecimal.
public static TimeSpan ToSeconds(this decimal nbSecondsDecimal)
Parameters
nbSecondsDecimaldecimalThe number of seconds.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToSeconds(double)
Gets a TimeSpan value, with total double number of seconds equals to double value nbSecondsDouble.
public static TimeSpan ToSeconds(this double nbSecondsDouble)
Parameters
nbSecondsDoubledoubleThe number of seconds.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToSeconds(short)
Gets a TimeSpan value, with total number of seconds equals to nbSeconds.
public static TimeSpan ToSeconds(this short nbSeconds)
Parameters
nbSecondsshortThe number of seconds.
Returns
ToSeconds(int)
Gets a TimeSpan value, with total number of seconds equals to nbSeconds.
public static TimeSpan ToSeconds(this int nbSeconds)
Parameters
nbSecondsintThe number of seconds.
Returns
ToSeconds(long)
Gets a TimeSpan value, with total number of seconds equals to nbSeconds.
public static TimeSpan ToSeconds(this long nbSeconds)
Parameters
nbSecondslongThe number of seconds.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToSeconds(byte?)
Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.
public static TimeSpan ToSeconds(this byte? nullableNbSeconds)
Parameters
nullableNbSecondsbyte?The number of seconds.
Returns
Remarks
ToSeconds(decimal?)
Gets a TimeSpan value, with total floating number of seconds equals to floating value nullableNbSecondsDecimal.
public static TimeSpan ToSeconds(this decimal? nullableNbSecondsDecimal)
Parameters
nullableNbSecondsDecimaldecimal?The number of seconds.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToSeconds(double?)
Gets a TimeSpan value, with total floating number of seconds equals to floating value nullableNbSecondsDouble.
public static TimeSpan ToSeconds(this double? nullableNbSecondsDouble)
Parameters
nullableNbSecondsDoubledouble?The number of seconds.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToSeconds(short?)
Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.
public static TimeSpan ToSeconds(this short? nullableNbSeconds)
Parameters
nullableNbSecondsshort?The number of seconds.
Returns
Remarks
ToSeconds(int?)
Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.
public static TimeSpan ToSeconds(this int? nullableNbSeconds)
Parameters
nullableNbSecondsint?The number of seconds.
Returns
Remarks
ToSeconds(long?)
Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.
public static TimeSpan ToSeconds(this long? nullableNbSeconds)
Parameters
nullableNbSecondslong?The number of seconds.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToSeconds(sbyte?)
Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.
public static TimeSpan ToSeconds(this sbyte? nullableNbSeconds)
Parameters
nullableNbSecondssbyte?The number of seconds.
Returns
Remarks
ToSeconds(float?)
Gets a TimeSpan value, with total floating number of seconds equals to floating value nullableNbSecondsFloat.
public static TimeSpan ToSeconds(this float? nullableNbSecondsFloat)
Parameters
nullableNbSecondsFloatfloat?The number of seconds.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToSeconds(ushort?)
Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.
public static TimeSpan ToSeconds(this ushort? nullableNbSeconds)
Parameters
nullableNbSecondsushort?The number of seconds.
Returns
Remarks
ToSeconds(uint?)
Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.
public static TimeSpan ToSeconds(this uint? nullableNbSeconds)
Parameters
nullableNbSecondsuint?The number of seconds.
Returns
Remarks
ToSeconds(ulong?)
Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.
public static TimeSpan ToSeconds(this ulong? nullableNbSeconds)
Parameters
nullableNbSecondsulong?The number of seconds.
Returns
Remarks
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue.
ToSeconds(sbyte)
Gets a TimeSpan value, with total number of seconds equals to nbSeconds.
public static TimeSpan ToSeconds(this sbyte nbSeconds)
Parameters
nbSecondssbyteThe number of seconds.
Returns
ToSeconds(float)
Gets a TimeSpan value, with total floating number of seconds equals to floating value nbSecondsFloat.
public static TimeSpan ToSeconds(this float nbSecondsFloat)
Parameters
nbSecondsFloatfloatThe number of seconds.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue or lower than TimeSpan.MinValue.
ToSeconds(ushort)
Gets a TimeSpan value, with total number of seconds equals to nbSeconds.
public static TimeSpan ToSeconds(this ushort nbSeconds)
Parameters
nbSecondsushortThe number of seconds.
Returns
ToSeconds(uint)
Gets a TimeSpan value, with total number of seconds equals to nbSeconds.
public static TimeSpan ToSeconds(this uint nbSeconds)
Parameters
nbSecondsuintThe number of seconds.
Returns
ToSeconds(ulong)
Gets a TimeSpan value, with total number of seconds equals to nbSeconds.
public static TimeSpan ToSeconds(this ulong nbSeconds)
Parameters
nbSecondsulongThe number of seconds.
Returns
Exceptions
- OverflowException
This exception is thrown if the expected time span is greater than TimeSpan.MaxValue.
TotalMonths(TimeSpan)
Gets duration.TotalYears(TimeSpan) multiplied by 12 months.
public static double TotalMonths(this TimeSpan duration)
Parameters
durationTimeSpanThe duration to convert in number of years.
Returns
TotalYears(TimeSpan)
Gets duration.TotalDays divided by 365 days.
public static double TotalYears(this TimeSpan duration)
Parameters
durationTimeSpanThe duration to convert in number of years.