I have two classes, stnt_1 and stnt_2 of the same type. Is it possible for me to call these from a loop? where 1 and 2 are the iterations of the loop control variable.
Other words, say that class had a displayString() method, is there a way for me to do this:
for (int i = 1;i>=2;i++) ( [INDENT]Console.Writeline(stnt_ [B]+ i +[/B] .displayString();[/INDENT] )
I am at a loss on what this would be called and as a result google has not pointed me in the correct direction. Is there a way in c# to evaluate i first, then join it to get the desired result?
Thanks for taking the time to read this.