語言

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"))

適用於