C# 클래스 Hourglass.Extensions.TimeSpanExtensions

Provides extensions methods for the TimeSpan struct.
파일 보기 프로젝트 열기: Dziemborowicz/Hourglass

공개 메소드들

메소드 설명
RoundDown ( this timeSpan ) : System.TimeSpan

Rounds a TimeSpan down to the nearest second.

RoundDown ( this timeSpan ) : TimeSpan?

Rounds a Nullable{TimeSpan} down to the nearest second.

RoundUp ( this timeSpan ) : System.TimeSpan

Rounds a TimeSpan up to the nearest second.

RoundUp ( this timeSpan ) : TimeSpan?

Rounds a Nullable{TimeSpan} up to the nearest second.

ToNaturalString ( this timeSpan ) : string

Converts the value of a TimeSpan object to its equivalent natural string representation.

ToNaturalString ( this timeSpan, IFormatProvider provider ) : string

Converts the value of a TimeSpan object to its equivalent natural string representation.

비공개 메소드들

메소드 설명
GetStringWithUnits ( int value, string unit, IFormatProvider provider ) : string

Returns a string for the specified value with the specified unit (e.g., "5 minutes").

메소드 상세

RoundDown() 공개 정적인 메소드

Rounds a TimeSpan down to the nearest second.
public static RoundDown ( this timeSpan ) : System.TimeSpan
timeSpan this A .
리턴 System.TimeSpan

RoundDown() 공개 정적인 메소드

Rounds a Nullable{TimeSpan} down to the nearest second.
public static RoundDown ( this timeSpan ) : TimeSpan?
timeSpan this A .
리턴 TimeSpan?

RoundUp() 공개 정적인 메소드

Rounds a TimeSpan up to the nearest second.
public static RoundUp ( this timeSpan ) : System.TimeSpan
timeSpan this A .
리턴 System.TimeSpan

RoundUp() 공개 정적인 메소드

Rounds a Nullable{TimeSpan} up to the nearest second.
public static RoundUp ( this timeSpan ) : TimeSpan?
timeSpan this A .
리턴 TimeSpan?

ToNaturalString() 공개 정적인 메소드

Converts the value of a TimeSpan object to its equivalent natural string representation.
public static ToNaturalString ( this timeSpan ) : string
timeSpan this A .
리턴 string

ToNaturalString() 공개 정적인 메소드

Converts the value of a TimeSpan object to its equivalent natural string representation.
public static ToNaturalString ( this timeSpan, IFormatProvider provider ) : string
timeSpan this A .
provider IFormatProvider An .
리턴 string