c# - To convert For loop into foreach loop -


how can convert below mentioned loop foreach loop? can assist me fix this?

 @for (int rcount = 0; rcount < @model.itemfilters.categories.count; rcount++) { //some code } 

probably, need this?

@foreach (var category in @model.itemfilters.categories) {      //some code } 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -