In my class, my teacher showed me something similar to this. Visual Studio is saying string doesn't have a definition for parse. I remember in class the teacher said it was something.parse(thingyouwanttoparse)
. No commas. I've searched online, but all the options are different to the one the teacher showed me. What am I doing wrong?
if (!ValidMenuOption)
{
string errorMsg = "\n\t Option must be ";
int iteration = 1;
while (iteration <=numAvailable)
{
errorMsg = errorMsg + string.parse(iteration) + ", ";
iteration += 1
}
errorMsg = errorMsg + "or 0";
Console.WriteLine(errorMsg);
} //end if