Uredi

Deli z drugimi prek


ProfileSettings.MinInterval Property

Definition

Gets or sets the minimum interval between two events of the same type.

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

Property Value

A TimeSpan that specifies the minimum interval between two events of the same type. The default is Zero.

Attributes

Examples

The following code example shows how to use the MinInterval property. This code example is part of a larger example provided for the HealthMonitoringSection class.

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

Remarks

The value can be made infinite by setting it to MaxValue. Invalid values may cause an exception when the configuration section is saved.

If the value is Zero, then there is no minimum interval.

Applies to

See also