Seperate pre/post csharp code into seperate for-loops