Matt H
Matt H

Reputation: 7389

How do I refer to a method overload using a dynamic type in C# XML comments?

I am trying to use the <see> tag in C#'s XML documentation. The problem is that I have two method overloads that use the dynamic keyword. So, I have something like the following: DoSomething(Func{dynamic,dynamic},object[])

I keep getting a compiler warning that my cref attribute cannot be resolved. I've tried and failed to fix this. What should I do?

Upvotes: 1

Views: 237

Answers (1)

Jon Skeet
Jon Skeet

Reputation: 1502406

Try using object instead - that's the real compile-time type, at the IL level, so:

<see cref="DoSomething(Func{object,object},object[])" />

Will give that a try to check it works myself...

Upvotes: 2

Related Questions