[Solved] How do i read a boolean value?


option variable should be of type string in your case.
Then, You need to change this bit (assignment operator)

if(option = friend)

to this (comparison operator)

if(option == friend)

So finally you will get (after readline command fix)

string friend;
string friend2;
string friend3;
string option;

Console.WriteLine("Who would you like to talk to first? " + friend + ", " + friend2 + ", " + friend3);

option = Console.ReadLine();

if(option == friend)
{

}

Have fun!

0

solved How do i read a boolean value?