Share via


ProcessModelSection.MaxAppDomains 属性

定义

获取或设置一个进程中所允许最大应用程序域数。

public:
 property int MaxAppDomains { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("maxAppDomains", DefaultValue=2000)]
[System.Configuration.IntegerValidator(MaxValue=2147483646, MinValue=1)]
public int MaxAppDomains { get; set; }
[<System.Configuration.ConfigurationProperty("maxAppDomains", DefaultValue=2000)>]
[<System.Configuration.IntegerValidator(MaxValue=2147483646, MinValue=1)>]
member this.MaxAppDomains : int with get, set
Public Property MaxAppDomains As Integer

属性值

一个进程中所允许的最大应用程序域数。

属性

示例

下面的代码示例演示如何访问 MaxAppDomains 属性。


// Get the current MaxAppDomains property value.
int maxAppdomains = 
 processModelSection.MaxAppDomains;

// Set the MaxAppDomains property to 4.
processModelSection.MaxAppDomains = 4;
' Get the current MaxAppDomains property value.
   Dim maxAppdomains As Integer = _
   processModelSection.MaxAppDomains

' Set the MaxAppDomains property to 4.
processModelSection.MaxAppDomains = 4

注解

MaxAppDomains如果超出阈值,则如果必须启动新的应用程序域,则会关闭使用最少的应用程序域。

适用于