语言

ProfileSettings.MaxLimit 属性

定义

获取或设置引发同一类型的事件的最大次数。

public:
 property int MaxLimit { int get(); void set(int value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteIntConverter))]
[System.Configuration.ConfigurationProperty("maxLimit", DefaultValue=2147483647)]
[System.Configuration.IntegerValidator(MinValue=0)]
public int MaxLimit { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteIntConverter))>]
[<System.Configuration.ConfigurationProperty("maxLimit", DefaultValue=2147483647)>]
[<System.Configuration.IntegerValidator(MinValue=0)>]
member this.MaxLimit : int with get, set
Public Property MaxLimit As Integer

属性值

引发同一类型的事件的最大次数。 默认值为 Int32.MaxValue。

属性

示例

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

profileSetting.MaxLimit = Int32.MaxValue;
profileSetting.MaxLimit = Int32.MaxValue

注解

此属性的值必须大于零。 通过将该值设置为 可以无限。 无效值可能会导致保存配置节时引发异常。

此属性指定将引发相同类型的事件的最大次数。 例如,如果值为, 10事件将引发 10 次,并随后忽略。

适用于

另请参阅