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)

适用于

另请参阅