Reputation: 11287
Consider this scenario, 2 interfaces, 1 generic:
public IGenericAdder<T>
{
T Add(T, T);
}
public IIntAdder : IGenericAdder<Int32>
{
}
Is there someway that I can do XML comments on the generic add method, so that intellisense will show "Adds the Int32" if I do a:
IIntAdder foo;
foo.Add( //Show intellisense here
Upvotes: 0
Views: 171
Reputation: 82944
I don't think there is a way. You could:
T Add(T, T)
method of IGenericAdder
with new int Add(int, int)
in IIntAdder
and put specific XML docs on it that refer to the correct types (ie. "Adds two ints together").T
.None of these really do what you originally asked though.
Upvotes: 1
Reputation: 351536
You don't need a doc comment - Visual Studio automatically fills in the generic type argument into the tooltip.
Upvotes: 0