Linq expression to filter formcollection

前端 未结 2 382
情书的邮戳
情书的邮戳 2021-01-02 18:53

I have a FormCollection and I just want to only iterate through the keys the do not contain the string pricing.

So what I tried was this...

foreach (         


        
2条回答
  •  走了就别回头了
    2021-01-02 19:05

    Are you sure that you're using Where and not Select?

    Using Where will return an IEnumerable which is what you're expecting.

    Using Select will return an IEnumerable which is what you say is actually happening.

提交回复
热议问题