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
要设置的TrustLevelTrustLevelCollection索引位置。
- 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)