Share via


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)

適用於

另請參閱