TrustLevelCollection.Get(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得在指定之索引處的 TrustLevel 物件。
public:
System::Web::Configuration::TrustLevel ^ Get(int index);
public System.Web.Configuration.TrustLevel Get (int index);
member this.Get : int -> System.Web.Configuration.TrustLevel
Public Function Get (index As Integer) As TrustLevel
參數
- index
- Int32
TrustLevelCollection 的索引。
傳回
指定之索引處的 TrustLevel。
範例
下列程式碼範例會示範如何使用 Get 方法。 此程式碼範例是針對 類別提供的較大範例的 TrustLevelCollection 一部分。
// Display item details of the collection.
for (int i = 0; i < TrustLevelCollection1.Count; i++)
{
Console.WriteLine("Collection item {0}", i);
Console.WriteLine("Name: {0}",
TrustLevelCollection1.Get(i).Name);
Console.WriteLine("PolicyFile: {0}",
TrustLevelCollection1.Get(i).PolicyFile);
Console.WriteLine();
}
' Display item details of the collection.
For i As Integer = 0 To (TrustLevelCollection1.Count - 1)
Console.WriteLine("Collection item {0}", i)
Console.WriteLine("Name: {0}", _
TrustLevelCollection1.Get(i).Name)
Console.WriteLine("PolicyFile: {0}", _
TrustLevelCollection1.Get(i).PolicyFile)
Console.WriteLine()
Next i