W
Wajih-ur-Rehman
string val = reader.ReadElementString(localName); //reader is XmlTextReader
if ( val != null )
{
if (val.Length != 0)
{
}
}
If the value of val comes out to be an empty string, it still goes in both
of the if conditions :| :| :| :| ( I have even tried val.Trim().Length != 0
as well.....it doesnt work too)
I have checked in the Watch Window that the length of val *is* 0 and also
the expression val.Lenght != 0 *is* evaluated to false, but still the
control gets into the if condition
Anyone has *any* explanation for this????????
Regards
if ( val != null )
{
if (val.Length != 0)
{
}
}
If the value of val comes out to be an empty string, it still goes in both
of the if conditions :| :| :| :| ( I have even tried val.Trim().Length != 0
as well.....it doesnt work too)
I have checked in the Watch Window that the length of val *is* 0 and also
the expression val.Lenght != 0 *is* evaluated to false, but still the
control gets into the if condition
Anyone has *any* explanation for this????????
Regards