Учитывая следующее
public class Service<T> : IService<T>
{
Repository<T> _repository = new Repository<T>();
public T Get<T>(int id)
{
return _repository.Get<T>(id);
}
}
public interface IService<T>
{
T Get<T>(int id);
}
, я получаю следующее предупреждение
Параметр типа 'T' имеет то же имя как параметр типа из внешнего типа 'Services.IService'
I am not sure what the issue is with this, why does it care if my return type is the same as the type I am telling the class to be. Am I missing something here?