I have a common set of MyCollection<T> that I created, and everything works fine, except for this new Apply function that I add:
class MyCollection<T> { T value; public MyCollection(T starter) { value = starter; } public MyCollection<S> Apply<T, S>(Func<T, S> function) { return new MyCollection<S>(function(value));
This gives me an error that I have never seen before:
Argument 1: cannot convert from 'T' to 'T [C:\folder\code.cs (line number)]'
What are the two types of T ? What happened to the conversion I'm trying to do?
source share