non-static

C#Non-static method requires a target异常

非静态方法需要一个目标,一般这种情况是调用的某个方法时传参为null,这种情况编译时不会报错,运行时会出错 解决方法就是检查代码中涉及的实体是否为空,就比如我这里,getchildren的list就是空在使用finall时就报错了 ......
Non-static requires static method target
共1篇  :1/1页 首页上一页1下一页尾页