Share via


HttpApplicationState.GetKey(Int32) Yöntem

Tanım

Dizine göre bir HttpApplicationState nesne adı alır.

public:
 System::String ^ GetKey(int index);
public string GetKey (int index);
member this.GetKey : int -> string
Public Function GetKey (index As Integer) As String

Parametreler

index
Int32

Uygulama durumu nesnesinin dizini.

Döndürülenler

Uygulama durumu nesnesinin kaydedildiği ad.

Örnekler

Aşağıdaki örnek, uygulama durumu koleksiyonundaki tüm nesnelerin adlarını döndürür ve adları bir dize dizisinde depolar.

int Loop1;
String[] StateVars = new String[Application.Count];

for (Loop1 = 0; Loop1 < Application.Count; Loop1++)
{
   StateVars[Loop1] = Application.GetKey(Loop1);
}
Dim Loop1 As Integer
Dim StateVars(Application.Count) As String
 
For Loop1 = 0 To Application.Count -1
   StateVars(Loop1) = Application.GetKey(Loop1)
Next Loop1

Şunlara uygulanır