Table of Contents

Class ExtensionMethodsTimeSpan

Namespace
NDepend.Helpers
Assembly
NDepend.API.dll

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

nbDays byte

The number of days.

Returns

TimeSpan

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

nbDaysDecimal decimal

The number of days.

Returns

TimeSpan

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

nbDaysDouble double

The number of days.

Returns

TimeSpan

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

nbDays short

The number of days.

Returns

TimeSpan

ToDays(int)

Gets a TimeSpan value, with total number of days equals to nbDays.

public static TimeSpan ToDays(this int nbDays)

Parameters

nbDays int

The number of days.

Returns

TimeSpan

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

nbDays long

The number of days.

Returns

TimeSpan

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

nullableNbDays byte?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDays is null, TimeSpan.Zero is returned.

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

nullableNbDaysDecimal decimal?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDaysDecimal is null, TimeSpan.Zero is returned.

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

nullableNbDaysDouble double?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDaysDouble is null, TimeSpan.Zero is returned.

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

nullableNbDays short?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDays is null, TimeSpan.Zero is returned.

ToDays(int?)

Gets a TimeSpan value, with total number of days equals to nullableNbDays.

public static TimeSpan ToDays(this int? nullableNbDays)

Parameters

nullableNbDays int?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDays is null, TimeSpan.Zero is returned.

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

nullableNbDays long?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDays is null, TimeSpan.Zero is returned.

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

nullableNbDays sbyte?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDays is null, TimeSpan.Zero is returned.

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

nullableNbDaysFloat float?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDaysFloat is null, TimeSpan.Zero is returned.

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

nullableNbDays ushort?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDays is null, TimeSpan.Zero is returned.

ToDays(uint?)

Gets a TimeSpan value, with total number of days equals to nullableNbDays.

public static TimeSpan ToDays(this uint? nullableNbDays)

Parameters

nullableNbDays uint?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDays is null, TimeSpan.Zero is returned.

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

nullableNbDays ulong?

The number of days.

Returns

TimeSpan

Remarks

if nullableNbDays is null, TimeSpan.Zero is returned.

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

nbDays sbyte

The number of days.

Returns

TimeSpan

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

nbDaysFloat float

The number of days.

Returns

TimeSpan

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

nbDays ushort

The number of days.

Returns

TimeSpan

ToDays(uint)

Gets a TimeSpan value, with total number of days equals to nbDays.

public static TimeSpan ToDays(this uint nbDays)

Parameters

nbDays uint

The number of days.

Returns

TimeSpan

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

nbDays ulong

The number of days.

Returns

TimeSpan

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

nbHours byte

The number of hours.

Returns

TimeSpan

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

nbHoursDecimal decimal

The number of hours.

Returns

TimeSpan

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

nbHoursDouble double

The number of hours.

Returns

TimeSpan

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

nbHours short

The number of hours.

Returns

TimeSpan

ToHours(int)

Gets a TimeSpan value, with total number of hours equals to nbHours.

public static TimeSpan ToHours(this int nbHours)

Parameters

nbHours int

The number of hours.

Returns

TimeSpan

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

nbHours long

The number of hours.

Returns

TimeSpan

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

nullableNbHours byte?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHours is null, TimeSpan.Zero is returned.

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

nullableNbHoursDecimal decimal?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHoursDecimal is null, TimeSpan.Zero is returned.

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

nullableNbHoursDouble double?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHoursDouble is null, TimeSpan.Zero is returned.

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

nullableNbHours short?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHours is null, TimeSpan.Zero is returned.

ToHours(int?)

Gets a TimeSpan value, with total number of hours equals to nullableNbHours.

public static TimeSpan ToHours(this int? nullableNbHours)

Parameters

nullableNbHours int?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHours is null, TimeSpan.Zero is returned.

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

nullableNbHours long?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHours is null, TimeSpan.Zero is returned.

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

nullableNbHours sbyte?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHours is null, TimeSpan.Zero is returned.

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

nullableNbHoursFloat float?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHoursFloat is null, TimeSpan.Zero is returned.

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

nullableNbHours ushort?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHours is null, TimeSpan.Zero is returned.

ToHours(uint?)

Gets a TimeSpan value, with total number of hours equals to nullableNbHours.

public static TimeSpan ToHours(this uint? nullableNbHours)

Parameters

nullableNbHours uint?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHours is null, TimeSpan.Zero is returned.

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

nullableNbHours ulong?

The number of hours.

Returns

TimeSpan

Remarks

if nullableNbHours is null, TimeSpan.Zero is returned.

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

nbHours sbyte

The number of hours.

Returns

TimeSpan

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

nbHoursFloat float

The number of hours.

Returns

TimeSpan

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

nbHours ushort

The number of hours.

Returns

TimeSpan

ToHours(uint)

Gets a TimeSpan value, with total number of hours equals to nbHours.

public static TimeSpan ToHours(this uint nbHours)

Parameters

nbHours uint

The number of hours.

Returns

TimeSpan

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

nbHours ulong

The number of hours.

Returns

TimeSpan

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

nbMilliseconds byte

The number of milli-seconds.

Returns

TimeSpan

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

nbMillisecondsDecimal decimal

The number of milli-seconds.

Returns

TimeSpan

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

nbMillisecondsDouble double

The number of milli-seconds.

Returns

TimeSpan

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

nbMilliseconds short

The number of milli-seconds.

Returns

TimeSpan

ToMilliseconds(int)

Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.

public static TimeSpan ToMilliseconds(this int nbMilliseconds)

Parameters

nbMilliseconds int

The number of milli-seconds.

Returns

TimeSpan

ToMilliseconds(long)

Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.

public static TimeSpan ToMilliseconds(this long nbMilliseconds)

Parameters

nbMilliseconds long

The number of milli-seconds.

Returns

TimeSpan

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

nullableNbMilliseconds byte?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMilliseconds is null, TimeSpan.Zero is returned.

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

nullableNbMillisecondsDecimal decimal?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMillisecondsDecimal is null, TimeSpan.Zero is returned.

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

nullableNbMillisecondsDouble double?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMillisecondsDouble is null, TimeSpan.Zero is returned.

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

nullableNbMilliseconds short?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMilliseconds is null, TimeSpan.Zero is returned.

ToMilliseconds(int?)

Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.

public static TimeSpan ToMilliseconds(this int? nullableNbMilliseconds)

Parameters

nullableNbMilliseconds int?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMilliseconds is null, TimeSpan.Zero is returned.

ToMilliseconds(long?)

Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.

public static TimeSpan ToMilliseconds(this long? nullableNbMilliseconds)

Parameters

nullableNbMilliseconds long?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMilliseconds is null, TimeSpan.Zero is returned.

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

nullableNbMilliseconds sbyte?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMilliseconds is null, TimeSpan.Zero is returned.

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

nullableNbMillisecondsFloat float?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMillisecondsFloat is null, TimeSpan.Zero is returned.

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

nullableNbMilliseconds ushort?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMilliseconds is null, TimeSpan.Zero is returned.

ToMilliseconds(uint?)

Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.

public static TimeSpan ToMilliseconds(this uint? nullableNbMilliseconds)

Parameters

nullableNbMilliseconds uint?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMilliseconds is null, TimeSpan.Zero is returned.

ToMilliseconds(ulong?)

Gets a TimeSpan value, with total number of milli-seconds equals to nullableNbMilliseconds.

public static TimeSpan ToMilliseconds(this ulong? nullableNbMilliseconds)

Parameters

nullableNbMilliseconds ulong?

The number of milli-seconds.

Returns

TimeSpan

Remarks

if nullableNbMilliseconds is null, TimeSpan.Zero is returned.

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

nbMilliseconds sbyte

The number of milli-seconds.

Returns

TimeSpan

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

nbMillisecondsFloat float

The number of milli-seconds.

Returns

TimeSpan

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

nbMilliseconds ushort

The number of milli-seconds.

Returns

TimeSpan

ToMilliseconds(uint)

Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.

public static TimeSpan ToMilliseconds(this uint nbMilliseconds)

Parameters

nbMilliseconds uint

The number of milli-seconds.

Returns

TimeSpan

ToMilliseconds(ulong)

Gets a TimeSpan value, with total number of milli-seconds equals to nbMilliseconds.

public static TimeSpan ToMilliseconds(this ulong nbMilliseconds)

Parameters

nbMilliseconds ulong

The number of milli-seconds.

Returns

TimeSpan

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

nbMinutes byte

The number of minutes.

Returns

TimeSpan

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

nbMinutesDecimal decimal

The number of minutes.

Returns

TimeSpan

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

nbMinutesDouble double

The number of minutes.

Returns

TimeSpan

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

nbMinutes short

The number of minutes.

Returns

TimeSpan

ToMinutes(int)

Gets a TimeSpan value, with total number of minutes equals to nbMinutes.

public static TimeSpan ToMinutes(this int nbMinutes)

Parameters

nbMinutes int

The number of minutes.

Returns

TimeSpan

ToMinutes(long)

Gets a TimeSpan value, with total number of minutes equals to nbMinutes.

public static TimeSpan ToMinutes(this long nbMinutes)

Parameters

nbMinutes long

The number of minutes.

Returns

TimeSpan

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. if nullableNbMinutes is null, TimeSpan.Zero is returned.

public static TimeSpan ToMinutes(this byte? nullableNbMinutes)

Parameters

nullableNbMinutes byte?

The number of minutes.

Returns

TimeSpan

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

nullableNbMinutesDecimal decimal?

The number of minutes.

Returns

TimeSpan

Remarks

if nullableNbMinutesDecimal is null, TimeSpan.Zero is returned.

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

nullableNbMinutesDouble double?

The number of minutes.

Returns

TimeSpan

Remarks

if nullableNbMinutesDouble is null, TimeSpan.Zero is returned.

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. if nullableNbMinutes is null, TimeSpan.Zero is returned.

public static TimeSpan ToMinutes(this short? nullableNbMinutes)

Parameters

nullableNbMinutes short?

The number of minutes.

Returns

TimeSpan

ToMinutes(int?)

Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes. if nullableNbMinutes is null, TimeSpan.Zero is returned.

public static TimeSpan ToMinutes(this int? nullableNbMinutes)

Parameters

nullableNbMinutes int?

The number of minutes.

Returns

TimeSpan

ToMinutes(long?)

Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes. if nullableNbMinutes is null, TimeSpan.Zero is returned.

public static TimeSpan ToMinutes(this long? nullableNbMinutes)

Parameters

nullableNbMinutes long?

The number of minutes.

Returns

TimeSpan

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. if nullableNbMinutes is null, TimeSpan.Zero is returned.

public static TimeSpan ToMinutes(this sbyte? nullableNbMinutes)

Parameters

nullableNbMinutes sbyte?

The number of minutes.

Returns

TimeSpan

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

nullableNbMinutesFloat float?

The number of minutes.

Returns

TimeSpan

Remarks

if nullableNbMinutesFloat is null, TimeSpan.Zero is returned.

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. if nullableNbMinutes is null, TimeSpan.Zero is returned.

public static TimeSpan ToMinutes(this ushort? nullableNbMinutes)

Parameters

nullableNbMinutes ushort?

The number of minutes.

Returns

TimeSpan

ToMinutes(uint?)

Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes. if nullableNbMinutes is null, TimeSpan.Zero is returned.

public static TimeSpan ToMinutes(this uint? nullableNbMinutes)

Parameters

nullableNbMinutes uint?

The number of minutes.

Returns

TimeSpan

ToMinutes(ulong?)

Gets a TimeSpan value, with total number of minutes equals to nullableNbMinutes. if nullableNbMinutes is null, TimeSpan.Zero is returned.

public static TimeSpan ToMinutes(this ulong? nullableNbMinutes)

Parameters

nullableNbMinutes ulong?

The number of minutes.

Returns

TimeSpan

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

nbMinutes sbyte

The number of minutes.

Returns

TimeSpan

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

nbMinutesFloat float

The number of minutes.

Returns

TimeSpan

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

nbMinutes ushort

The number of minutes.

Returns

TimeSpan

ToMinutes(uint)

Gets a TimeSpan value, with total number of minutes equals to nbMinutes.

public static TimeSpan ToMinutes(this uint nbMinutes)

Parameters

nbMinutes uint

The number of minutes.

Returns

TimeSpan

ToMinutes(ulong)

Gets a TimeSpan value, with total number of minutes equals to nbMinutes.

public static TimeSpan ToMinutes(this ulong nbMinutes)

Parameters

nbMinutes ulong

The number of minutes.

Returns

TimeSpan

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

nbSeconds byte

The number of seconds.

Returns

TimeSpan

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

nbSecondsDecimal decimal

The number of seconds.

Returns

TimeSpan

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

nbSecondsDouble double

The number of seconds.

Returns

TimeSpan

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

nbSeconds short

The number of seconds.

Returns

TimeSpan

ToSeconds(int)

Gets a TimeSpan value, with total number of seconds equals to nbSeconds.

public static TimeSpan ToSeconds(this int nbSeconds)

Parameters

nbSeconds int

The number of seconds.

Returns

TimeSpan

ToSeconds(long)

Gets a TimeSpan value, with total number of seconds equals to nbSeconds.

public static TimeSpan ToSeconds(this long nbSeconds)

Parameters

nbSeconds long

The number of seconds.

Returns

TimeSpan

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

nullableNbSeconds byte?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSeconds is null, TimeSpan.Zero is returned.

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

nullableNbSecondsDecimal decimal?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSecondsDecimal is null, TimeSpan.Zero is returned.

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

nullableNbSecondsDouble double?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSecondsDouble is null, TimeSpan.Zero is returned.

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

nullableNbSeconds short?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSeconds is null, TimeSpan.Zero is returned.

ToSeconds(int?)

Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.

public static TimeSpan ToSeconds(this int? nullableNbSeconds)

Parameters

nullableNbSeconds int?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSeconds is null, TimeSpan.Zero is returned.

ToSeconds(long?)

Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.

public static TimeSpan ToSeconds(this long? nullableNbSeconds)

Parameters

nullableNbSeconds long?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSeconds is null, TimeSpan.Zero is returned.

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

nullableNbSeconds sbyte?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSeconds is null, TimeSpan.Zero is returned.

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

nullableNbSecondsFloat float?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSecondsFloat is null, TimeSpan.Zero is returned.

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

nullableNbSeconds ushort?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSeconds is null, TimeSpan.Zero is returned.

ToSeconds(uint?)

Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.

public static TimeSpan ToSeconds(this uint? nullableNbSeconds)

Parameters

nullableNbSeconds uint?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSeconds is null, TimeSpan.Zero is returned.

ToSeconds(ulong?)

Gets a TimeSpan value, with total number of seconds equals to nullableNbSeconds.

public static TimeSpan ToSeconds(this ulong? nullableNbSeconds)

Parameters

nullableNbSeconds ulong?

The number of seconds.

Returns

TimeSpan

Remarks

if nullableNbSeconds is null, TimeSpan.Zero is returned.

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

nbSeconds sbyte

The number of seconds.

Returns

TimeSpan

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

nbSecondsFloat float

The number of seconds.

Returns

TimeSpan

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

nbSeconds ushort

The number of seconds.

Returns

TimeSpan

ToSeconds(uint)

Gets a TimeSpan value, with total number of seconds equals to nbSeconds.

public static TimeSpan ToSeconds(this uint nbSeconds)

Parameters

nbSeconds uint

The number of seconds.

Returns

TimeSpan

ToSeconds(ulong)

Gets a TimeSpan value, with total number of seconds equals to nbSeconds.

public static TimeSpan ToSeconds(this ulong nbSeconds)

Parameters

nbSeconds ulong

The number of seconds.

Returns

TimeSpan

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

duration TimeSpan

The duration to convert in number of years.

Returns

double

TotalYears(TimeSpan)

Gets duration.TotalDays divided by 365 days.

public static double TotalYears(this TimeSpan duration)

Parameters

duration TimeSpan

The duration to convert in number of years.

Returns

double