OR condition in for loop with regex
I have a for loop in which I am looping throw a data table rows.I need to
implement a condition in this loop like, loop must execute only 10 times
or the number of rows in the datatable (which one is smaller). example -If
datatable have 12 rows loop need to be executed 10 times only.or if
datatable have 8 rows loop need to be executed 8 times only not 10.name of
my datatable is "dt". and I had tried some thing like this.
for (int i = 0; i < 10 || dt.Rows.Count;i++ )
I believe I can make this logic with a simple regular expression in my
code.Can any one point out what need to do.
No comments:
Post a Comment