Logic for FOR loop in c#

Posted by karthik on Stack Overflow See other posts from Stack Overflow or by karthik
Published on 2010-04-22T04:04:37Z Indexed on 2010/04/22 4:13 UTC
Read the original article Hit count: 305

Filed under:

My method has a parameter, I have to use that in my For loop to iterate.

For example, I have a text file with 4 lines.

If the Param is 1, the for loop must iterate through the last three lines If the Param is 2, the for loop must iterate through the last two lines If the Param is 3, the for loop must iterate through the last one line

How can i pass this param in my For loop to achieve all the three scenarios stated above ?

© Stack Overflow or respective owner

Related posts about c#