語言

ProfileSettings.MinInterval 屬性

定義

取得或設定兩個相同類型事件之間的最小區間。

public:
 property TimeSpan MinInterval { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))]
[System.Configuration.ConfigurationProperty("minInterval", DefaultValue="00:00:00")]
public TimeSpan MinInterval { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))>]
[<System.Configuration.ConfigurationProperty("minInterval", DefaultValue="00:00:00")>]
member this.MinInterval : TimeSpan with get, set
Public Property MinInterval As TimeSpan

屬性值

A TimeSpan 指定了兩個相同類型事件之間的最小區間。 預設值為 Zero。

屬性

範例

以下程式碼範例說明如何使用該 MinInterval 屬性。 此程式碼範例是本類別更大範例 HealthMonitoringSection 的一部分。

profileSetting.MinInterval = TimeSpan.Parse("00:01:00");
profileSetting.MinInterval = TimeSpan.Parse("00:01:00")

備註

可透過將 設定為 MaxValue,使值無限大。 當儲存組態區段時,無效值可能會引發異常。

若值為 Zero,則不存在最小區間。

適用於

另請參閱