“An object reference is required for the non-static field, method, or property”

前端 未结 1 1903
野趣味
野趣味 2020-12-12 08:03

i am stuck with this small problem in my code.

I am trying to make small console application which will write into xml document. I have used xmldocument and xmlnode

相关标签:
1条回答
  • 2020-12-12 08:23

    You're trying to call an instance method, but without specifying an instance.

    The simplest fix for this is to make the give_node method static.

    I haven't looked at the rest of the code to see whether it's okay or not, although give_node should be called GiveNode to follow .NET naming conventions.

    0 讨论(0)
提交回复
热议问题