TrustLevelCollection.Get Method (Int32)

 

Gets the TrustLevel object at the specified index.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

public TrustLevel Get(
	int index
)

Parameters

index
Type: System.Int32

The index of the TrustLevelCollection.

Return Value

Type: System.Web.Configuration.TrustLevel

The TrustLevel at the specified index.

The following code example demonstrates how to use the Get method. This code example is part of a larger example provided for the TrustLevelCollection class.

// 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();
}

.NET Framework
Available since 2.0
Return to top
Show: