G
Guest
The following (C#) code snippet sets the text property of a label to null,
then tests it for null, only to find out that is isn't. Can anyone explain
why?
Label1.Text = null;
if (Label1.Text == null) {
Label2.Text = "Is null";
} else {
Label2.Text = "Is not null";
}
then tests it for null, only to find out that is isn't. Can anyone explain
why?
Label1.Text = null;
if (Label1.Text == null) {
Label2.Text = "Is null";
} else {
Label2.Text = "Is not null";
}