Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

How to I check if string length equals zero in C#?

$
0
0

I have if statement if C# and I want to add a condition to check if string length equals zero for xml code 

<xsl:when test="(Cancelled='True') and (string-length(RescheduledReason)=0)">Cancelled</xsl:when>

Here is what I already have but I have not checked string length for RescheduledReason =0. This is what I need help to add it to my if statement.

//HearingCancelled 

if ((objxmlNode.SelectSingleNode("Cancelled") != null) && (objxmlNode.SelectSingleNode("Cancelled").InnerText == "True"))                       

{   

objPrepHearDoc.Hearing.Settings[i].SettingStatus = "Cancelled";                     

}




Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>