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

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

반환

String

애플리케이션 상태 개체를 저장할 때 사용되는 이름입니다.

예제

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

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

적용 대상