G
Guest
I have a variable that can be between (1) and (1,2,3,4,5) etc...
this variable shows which type of query to run, and each runs from a private
void function. I understand the method of doing but don't know enough C# yet
be able to finish.
I am trying to do something like this I think?
Should this be either a switch or a foreach type of function?
String[] optionsSelected = imageType.Split(',');
Foreach(string option in optionsSelected){
//do the building
Switch(option)
{
Case "1":
//build One
Break;
Case "2":
//build two
Break;
Default:
//build one
//build two
//build three
}
}
is this the best way to do this? or is there something that makes more sense?
Thanks
this variable shows which type of query to run, and each runs from a private
void function. I understand the method of doing but don't know enough C# yet
be able to finish.
I am trying to do something like this I think?
Should this be either a switch or a foreach type of function?
String[] optionsSelected = imageType.Split(',');
Foreach(string option in optionsSelected){
//do the building
Switch(option)
{
Case "1":
//build One
Break;
Case "2":
//build two
Break;
Default:
//build one
//build two
//build three
}
}
is this the best way to do this? or is there something that makes more sense?
Thanks