I am currently working with a bunch of c sharp scripts and I want to implement this such that each script will be quite unique for a certain task . Which is why I want to #load certain script when a certain condition is fulfilled. But seems like by trying tom do so is not allowed in scriptcs
ERROR: Error executing script 'app.csx' [InvalidDirectiveUseException] Encountered directive '#load' after the start of code. Please move this directive to the beginning of the file.
What I would like to know is whether there is any alternative method to implement a similar functionality in csx
Below is a code from what I hope to achieve
string value ="1";
if(value.Equals("1"))
{
#load install1.csx
}
else if(value.Equals("2"))
{
#load install2.csx
}
else
{
#load install3.csx
}