Home > Net >  HttpContext. Current. Request. Files [key] can be preserved, first reorder pass again
HttpContext. Current. Request. Files [key] can be preserved, first reorder pass again

Time:01-30

Code is as follows:
 
Foreach (string key in HttpContext. Current. Request the Files)
{
HttpContext. Current. Request. Files [key] SaveAs (fullpath + fileName);
}



I want to change to this:
Var lb=new var [] [];
int i=0;
Foreach (string key in HttpContext. Current. Request the Files)
{
Lb [I]=HttpContext. Current. Request the Files [key];
i++;
}

[/code]
But no var [] this syntax, please tall person to give directions, thank you!

CodePudding user response:

Var lb=HttpContext. Current. Request. Files. Select (the file=& gt; The file [Key]). The ToArray;

CodePudding user response:

Your grammar, writing c?
  •  Tags:  
  • C#
  • Related