patrickcabenjamin
12 Apr 2009, 1:28pm
Hi
I am a C# noob, most of the things i know about it i have asked on Icrontic. I want to find a way to go to another part in the script.
for example
System.Console.Out.WriteLine("do you want to exit");
string1 = System.Console.In.ReadLine();
if (string1.ToLower().Contains"yes"))
{
//here it would go to the end
}
else
//here it would continue the script
or if it goes back
System.Console.Out.WriteLine("hello");
System.Console.Out.WriteLine("do you want me to repeat that");
string1 = System.Console.In.ReadLine();
if (string1.ToLower().Contains"yes"))
{
//here it would go back
}
else
//here it would continue the script
is this possible? and if so how?
I am a C# noob, most of the things i know about it i have asked on Icrontic. I want to find a way to go to another part in the script.
for example
System.Console.Out.WriteLine("do you want to exit");
string1 = System.Console.In.ReadLine();
if (string1.ToLower().Contains"yes"))
{
//here it would go to the end
}
else
//here it would continue the script
or if it goes back
System.Console.Out.WriteLine("hello");
System.Console.Out.WriteLine("do you want me to repeat that");
string1 = System.Console.In.ReadLine();
if (string1.ToLower().Contains"yes"))
{
//here it would go back
}
else
//here it would continue the script
is this possible? and if so how?