in reply to strange "for " statement

I don't think c# has pointers, so corion's code is probably unusable.

I believe you CAN do references in c#, so that is probably the way to go.

Since this is a perl forum, we will leave you the exercise of figuring out the c# code.