Hi folks,
I came across something strange a few moments ago when testing some
strings.
In my application a particular object has a name and a title, and is
displayed on a webpage thusly:
Object name - title
But the " - title" bit is only displayed, obviously, if it is
appropriate, ie. a title has been set for that object. I attempted to
achieve that by testing with:
if (myObject.Title != string.Empty) {
...
}
Yet this didn't work as the Title property was returning 'null'. So it
got me wondering, why is 'null != string.Empty' when the 'null' value
belongs to an object of type string?
--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references