Eranga <km***@yahoo.com> wrote:
What is empty character literal and how can we get rid of it.
I want to check whether the text box is empty so I use
if (TextBox1.Text == '' ) Why cant I do this?
Because there's no such thing as an empty character literal, and the
type of TextBox.Text is string, not char anyway.
You can use
if (TextBox1.Text == "")
to test whether it's an empty string.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too