C# go to next item in list based on if statement in foreach

前端 未结 5 2257
深忆病人
深忆病人 2020-12-14 05:42

I am using C#. I have a list of items. I loop through each item using a foreach. Inside my foreach I have a lot of if statements ch

5条回答
  •  独厮守ぢ
    2020-12-14 06:04

    The continue keyword will do what you are after. break will exit out of the foreach loop, so you'll want to avoid that.

提交回复
热议问题