DesignScript to C#

To start with, I’m still a beginner with C#. So before trying to write a new method in C#, I find it pretty helpful to do a rough draft with Dynamo nodes first so I can quickly iterate through different ideas. Then it’s pretty easy to condense everything into a code block using Node to Code. From there, does anyone have any ideas for “converting” from DesignScript to C#? Specifically, a way to get from @Levels to a looping structure in C# would be really handy.