Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
无论如何在到达代码的这一部分之前在这里检查一个空值吗?
tmpLabelData(0) = m_node.Item("CONTAINER_NAME").InnerText
一些 XML 有它,而另一些则没有。我似乎找不到处理这些 null 的好方法?
大卫
If Not m_node.Item("CONTAINER_NAME") Is Nothing AndAlso _ Len(m_node.Item("CONTAINER_NAME").InnerText) > 0 Then tmpLabelData(0) = m_node.Item("CONTAINER_NAME").InnerText End If