TrustLevelCollection.Set(Int32, TrustLevel) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將指定的 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
範例
以下程式碼範例示範如何使用此 Set 方法。 此程式碼範例是本類別更大範例 TrustLevelCollection 的一部分。
// Set the TrustLevel object within the collection.
TrustLevelCollection1.Set(1, TrustLevel2);
' Set the TrustLevel object within the collection.
TrustLevelCollection1.Set(1, TrustLevel2)