Hello Everybody
When i am compiling the code below then i am getting this error
[red]Input String is not in the correct format[/red]
what could be the problem there in the code below...
thanks
§ Rented Lips §
----------------
Begning To Learn
----------------
When i am compiling the code below then i am getting this error
[red]Input String is not in the correct format[/red]
what could be the problem there in the code below...
Code:
static void Main(string[] args)
{
string Signal = "0"; // giving the string a netural value
while (Signal != "X")
{
Console.WriteLine("Enter some Signal: ");
Signal = Console.ReadLine();
Console.WriteLine("Signal entered was: {0}\n", Signal);
if (Signal == "A")
{
Console.WriteLine("Fault Found - Aborting...");
break;
}
if (Signal == "0")
{
// all is fine just continue working
Console.WriteLine("All is fine - Move On");
continue;
}
if (Signal != "A" || Signal != "0")
{
// all problem...raise alarm
Console.WriteLine("{0)---------Invalid entry!\n", Signal);
continue;
}
}
}
thanks
§ Rented Lips §
----------------
Begning To Learn
----------------