Duration Duration Duration Duration Struct

定義

表示 Timeline 作用中的持續時間。Represents the duration of time that a Timeline is active.

public value class Duration
[System.Security.SecurityCritical]
public struct Duration
type Duration = struct
Public Structure Duration
繼承
屬性

備註

這個結構代表 Windows 執行階段 (WinRT) Duration結構的 .net 投射。This struct represents the .NET projection of the Windows Runtime (WinRT) Duration struct. 如需詳細資訊, 請參閱 UWP API 參考中的持續時間For more information, see Duration in the UWP API reference.

建構函式

Duration(TimeSpan) Duration(TimeSpan) Duration(TimeSpan) Duration(TimeSpan)

使用指定的 Duration 值,初始化 TimeSpan 結構的新執行個體。Initializes a new instance of the Duration struct with the specified TimeSpan value.

屬性

Automatic Automatic Automatic Automatic

取得自動決定的 Duration 值。Gets a Duration value that is automatically determined.

Forever Forever Forever Forever

取得表示無限間隔的 Duration 值。Gets a Duration value that represents an infinite interval.

HasTimeSpan HasTimeSpan HasTimeSpan HasTimeSpan

取得值,這個值指出這個 Duration 是否表示 TimeSpan 值。Gets a value that indicates if this Duration represents a TimeSpan value.

TimeSpan TimeSpan TimeSpan TimeSpan

取得這個 Duration 所代表的 TimeSpan 值。Gets the TimeSpan value that this Duration represents.

方法

Add(Duration) Add(Duration) Add(Duration) Add(Duration)

將指定 Duration 的值加入至這個 DurationAdds the value of the specified Duration to this Duration.

Compare(Duration, Duration) Compare(Duration, Duration) Compare(Duration, Duration) Compare(Duration, Duration)

將一個 Duration 值與另一個值比較。Compares one Duration value to another.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於 DurationDetermines whether a specified object is equal to a Duration.

Equals(Duration) Equals(Duration) Equals(Duration) Equals(Duration)

判斷指定的 Duration 是否等於這個 DurationDetermines whether a specified Duration is equal to this Duration.

Equals(Duration, Duration) Equals(Duration, Duration) Equals(Duration, Duration) Equals(Duration, Duration)

判斷兩個 Duration 值是否相等。Determines whether two Duration values are equal.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

取得這個物件的雜湊碼。Gets a hash code for this object.

Subtract(Duration) Subtract(Duration) Subtract(Duration) Subtract(Duration)

將指定 Duration 從這個 Duration 減去。Subtracts the specified Duration from this Duration.

ToString() ToString() ToString() ToString()

Duration 轉換為 String 表示。Converts a Duration to a String representation.

運算子

Addition(Duration, Duration) Addition(Duration, Duration) Addition(Duration, Duration) Addition(Duration, Duration)

相加兩個 Duration 值。Adds two Duration values together.

Equality(Duration, Duration) Equality(Duration, Duration) Equality(Duration, Duration) Equality(Duration, Duration)

判斷兩個 Duration 案例是否相等。Determines whether two Duration cases are equal.

GreaterThan(Duration, Duration) GreaterThan(Duration, Duration) GreaterThan(Duration, Duration) GreaterThan(Duration, Duration)

判斷一個 Duration 是否大於另外一個。Determines if one Duration is greater than another.

GreaterThanOrEqual(Duration, Duration) GreaterThanOrEqual(Duration, Duration) GreaterThanOrEqual(Duration, Duration) GreaterThanOrEqual(Duration, Duration)

判斷 Duration 是否大於或等於另外一個。Determines whether a Duration is greater than or equal to another.

Implicit(TimeSpan to Duration) Implicit(TimeSpan to Duration) Implicit(TimeSpan to Duration) Implicit(TimeSpan to Duration)

從指定的 Duration 隱含地建立 TimeSpanImplicitly creates a Duration from a given TimeSpan.

Inequality(Duration, Duration) Inequality(Duration, Duration) Inequality(Duration, Duration) Inequality(Duration, Duration)

判斷兩個 Duration 案例是否不相等。Determines if two Duration cases are not equal.

LessThan(Duration, Duration) LessThan(Duration, Duration) LessThan(Duration, Duration) LessThan(Duration, Duration)

判斷一個 Duration 是否小於另外一個執行個體的值。Determines if a Duration is less than the value of another instance.

LessThanOrEqual(Duration, Duration) LessThanOrEqual(Duration, Duration) LessThanOrEqual(Duration, Duration) LessThanOrEqual(Duration, Duration)

判斷 Duration 是否小於或等於另外一個。Determines if a Duration is less than or equal to another.

Subtraction(Duration, Duration) Subtraction(Duration, Duration) Subtraction(Duration, Duration) Subtraction(Duration, Duration)

Duration 的一個值減去另一個值。Subtracts the value of one Duration from another.

UnaryPlus(Duration) UnaryPlus(Duration) UnaryPlus(Duration) UnaryPlus(Duration)

傳回指定的 DurationReturns the specified Duration.

適用於

另請參閱