Why isn't my generic working properly ? - C#