HttpFileCollection.GetKey(Int32) 메서드

정의

지정된 숫자 인덱스가 HttpFileCollection 있는 멤버의 이름을 반환합니다.

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

반환할 개체 이름의 인덱스입니다.

반품

로 지정된 HttpFileCollection멤버의 index 이름입니다.

예제

다음 예제에서는 파일 컬렉션을 반복하고 이름이 "CustInfo"인 파일 컬렉션 멤버가 있는 경우 작업을 수행합니다.

int loop1;
 HttpFileCollection MyFileColl = Request.Files;

 for( loop1 = 0; loop1 < MyFileColl.Count; loop1++)
 {
    if( MyFileColl.GetKey(loop1) == "CustInfo")
    {
       //...
    }
 }
Dim loop1 As Integer
 Dim MyFileColl As HttpFileCollection = Request.Files
 
 For loop1 = 0 To MyFileColl.Count - 1
    If MyFileColl.GetKey(loop1) = "CustInfo" Then
       '...
    End If
 Next loop1

적용 대상