Quantcast
Channel: Microsoft "Roslyn" CTP forum
Viewing all articles
Browse latest Browse all 504

Mixing #load command with code in a single C# Interactive submission

$
0
0

I have been writing .csx scripts and executing them by selecting chunks of code and pressing control + enter. I tried to "refactor" some of my longer scripts by moving chunks of code to a dedicated .csx file and then executing them with #load.

This works in principle, but I have to select each #load command separately and press control + enter, otherwise I get errors like "Unexpected text". Scripting would be a lot easier if I could control + enter chunks like this:

#load "InitStuff.csx"
#load "DoStuff.csx"
for (int i=0; i<stuff.Length; i++)
stuff.DoMoreStuff();
#load "ShowResults.csx"

Thanks,
Drew


Viewing all articles
Browse latest Browse all 504

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>