HttpFileCollection.GetKey(Int32) Metódus

Definíció

A megadott numerikus indexet tartalmazó tag nevét HttpFileCollection adja vissza.

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

Paraméterek

index
Int32

A visszaadandó objektumnév indexe.

Válaszok

A tag által megadott HttpFileCollectionnévindex.

Példák

Az alábbi példa végigfut a fájlgyűjteményen, és végrehajtja a műveletet, ha egy "CustInfo" nevű fájlgyűjtemény-tag található.

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

A következőre érvényes: