我在c#中有这段代码
doc.SelectSingleNode("WhoisRecord/registrant/email").InnerText
Run Code Online (Sandbox Code Playgroud)
我怎样才能检查它是否返回null?
小智 7
var n = doc.SelectSingleNode("WhoisRecord/registrant/email");
if (n != null) { // here is the check
DoSomething(n.InnerText);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
20103 次 |
| 最近记录: |