阅读背景:

如果没有找到元素,如何解析xml文件并返回默认值

来源:互联网 

I wrote a simple method in C# to parse a given xml file and return the value of a specific node. It works fine but I'd also like to return a default value if the node is not found instead of throwing an exception. How can I do this? Can the method be written better? Thanks for any help offered. JohnI wrote a simple method in C# to parse a given




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: