Suppose I have a general method:
void Fun<T>(FunArg arg) {}
Are this.Fun<Feature>
and this.Fun<Category>
different instances of a common method?
In general, how is the general method generated? Does a different general argument create a different method or the same method along with the different metadata used at runtime?
Please support your answer with some quotes from the language specification.
Also, suppose I did this:
client.SomeEvent += this.Fun<Feature>; //line1 client.SomeEvent += this.Fun<Category>; //line2 client.SomeEvent += this.Fun<Result>; //line3
and then,
client.SomeEvent -= this.Fun<Feature>;
Does lineX
thing I did in line1
? Or does it depend on something else?
Nawaz source share