Message Warning CS0108!

Asked

Viewed 135 times

1

Because when I inherit an interface and implement the same methods I get Warning CS0108.

Active A variable was declared with the same name as a variable in a base class. However, the new keyword was not used. This Warning informs you that you should use new; the variable is declared as if new had been used in the declaration.

For example;

public interface IRepositorioDeValidador : IRepositorio<Validador>
{   
    void Adicionar(Validador validador);
    void Alterar(Validador validador);
    void Excluir(Validador validador);
}

public interface IRepositorio<TEntidade> where TEntidade : Poco
{
    void Adicionar(TEntidade entidade);
    void Excluir(TEntidade entidade);
}

In the IRepositorioDeValidador the void Adicionar(Validador validador); and void Excluir(Validador validador); show me this message, I know I didn’t need them in this interface, but it was created like this and I have several cases like this.

Is there any way to not show the message in my interface that you get from IRepositorio and are already that way?

  • 1

    This answer will help you : https://answall.com/questions/151243/howit works

1 answer

2


Browser other questions tagged

You are not signed in. Login or sign up in order to post.