语言

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

属性值

一个 TimeSpan ,指定同一类型的两个事件之间的最小间隔。 默认值为 Zero。

属性

示例

下面的代码示例演示如何使用该 MinInterval 属性。 该代码示例是 HealthMonitoringSection 类中的一个较大示例的一部分。

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

注解

通过将该值设置为 可以无限。 保存配置节时,无效值可能会导致异常。

如果值为 Zero,则不存在最小间隔。

适用于

另请参阅