This is what i get but i need help whit ReadAndValidateInput i need to return if both method is true i need to return troue else return false. I know that is going to be a if and else but what do i need to get in to it to do it?

Re: true false

Posted 27 February 2012 - 09:04 AM

i have this code to get the info in to the list box lstSeats.Items.Add(string.Format("\t\t{0} \t{1}",txtPrice.Text, txtName.Text)); but i think i need to use it in bool inputOk = ReadAndValidateInput(out costumerName, out seatPrice);and remove the click1? but how can i do it sorry im a noob in this

In a logical AND (&&), the second will never be evaluated. A bitwise AND (&) is just combining bits. A bitwise AND preforms an operation, combining the bits of the elements involved. http://msdn.microsof...c(v=vs.80).aspx

C# has overloaded the & operator to behave like a && with bool types. So & and && are identical for boolean (in C#)! However, it's still a poor choice when you intended a boolean operation. Also, in most other languages this trick isn't done so being in the habit of it will burn you.