I am trying to figure out if I have an XmlNodeList object, and Count is greater or equal to 1, will its “Item” object ever be null?
If so, how can I check if it is null before calling its “HasChildNode” property?
if (XmlNodeList.Item(0).HasChildNodes)
Thanks,
No item will never be
nullin the example you give – usually you would access the items differently though – either by index directly (if you need the index):or with
foreach: