HttpApplicationState.GetKey(Int32) 메서드

정의

인덱스별로 HttpApplicationState 개체 이름을 가져옵니다.

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

매개 변수

index
Int32

애플리케이션 상태 개체의 인덱스입니다.

반품

애플리케이션 상태 개체가 저장된 이름입니다.

예제

다음 예제에서는 애플리케이션 상태 컬렉션에 있는 모든 개체의 이름을 반환 하 고 문자열 배열에 이름을 저장 합니다.

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

적용 대상