Compiler says I am not implementing my interface, but I am?

后端 未结 7 1437
無奈伤痛
無奈伤痛 2021-02-13 14:03

Okay, I have two namespaces. One contains my interface and one contains the implementing class. Like this:

namespace Project.DataAccess.Interfaces
{
    public i         


        
7条回答
  •  一生所求
    2021-02-13 14:24

    'Project.DataAccess.Concrete.Account.SomeMethod' cannot implement an interface member because it is not public

    namespace Project.DataAccess.Concrete
    {
        public class Account : IAccount    
        {
            public string IAccount.SomeMethod()
            {
                return "Test";
            }
        }
    }
    

提交回复
热议问题