Share via


TrustLevelCollection.Add(TrustLevel) 方法

定義

TrustLevel 物件加入至集合。

public:
 void Add(System::Web::Configuration::TrustLevel ^ trustLevel);
public void Add (System.Web.Configuration.TrustLevel trustLevel);
member this.Add : System.Web.Configuration.TrustLevel -> unit
Public Sub Add (trustLevel As TrustLevel)

參數

trustLevel
TrustLevel

要加入至集合的 TrustLevel

範例

下列程式碼範例會示範如何使用 Add 方法。 此程式碼範例是提供給 類別之較大範例的 TrustLevelCollection 一部分。

// Add a new TrustLevel to the collection.
TrustLevelCollection1.Add(new TrustLevel("Level1", "Level1.config"));
' Add a new TrustLevel to the collection.
TrustLevelCollection1.Add(New TrustLevel("Level1", "Level1.config"))

適用於