Member '' cannot be accessed with an instance reference

前端 未结 10 1698
我在风中等你
我在风中等你 2020-11-22 10:39

I am getting into C# and I am having this issue:

namespace MyDataLayer
{
    namespace Section1
    {
        public class MyClass
        {
            publ         


        
10条回答
  •  长情又很酷
    2020-11-22 11:13

    I got here googling for C# compiler error CS0176, through (duplicate) question Static member instance reference issue.

    In my case, the error happened because I had a static method and an extension method with the same name. For that, see Static method and extension method with same name.

    [May be this should have been a comment. Sorry that I don't have enough reputation yet.]

提交回复
热议问题