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

要设置的TrustLevelTrustLevelCollection索引位置。

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)

适用于

另请参阅