TrustLevelCollection.Set(Int32, TrustLevel) 方法

定義

將指定的 TrustLevel 物件加入 TrustLevelCollection 指定的索引物件。

public:
 void Set(int index, System::Web::Configuration::TrustLevel ^ trustLevel);
public void Set(int index, System.Web.Configuration.TrustLevel trustLevel);
member this.Set : int * System.Web.Configuration.TrustLevel -> unit
Public Sub Set (index As Integer, trustLevel As TrustLevel)

參數

index
Int32

TrustLevel中設定的 的TrustLevelCollection索引位置。

trustLevel
TrustLevel

TrustLevel 設於 TrustLevelCollection

範例

以下程式碼範例示範如何使用此 Set 方法。 此程式碼範例是本類別更大範例 TrustLevelCollection 的一部分。

// Set the TrustLevel object within the collection.
TrustLevelCollection1.Set(1, TrustLevel2);
' Set the TrustLevel object within the collection.
TrustLevelCollection1.Set(1, TrustLevel2)

適用於

另請參閱