KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Given the following 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); } I get the following warning Type parameter 'T' has the same name as the type parameter from outer type '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?
Tags (comma-separated)
Save Edits
Cancel