8

What is the proper XML-comment syntax to refer to the SingleOrDefault extension method on the IEnumerable interface?

My latest attempt is:

<see cref="IEnumerable{T}.SingleOrDefault{T}()"/>

The warning is:

XML comment on 'yourMethod' has cref attribute 'IEnumerable.SingleOrDefault()' that could not be resolved

harley.333
  • 3,696
  • 2
  • 26
  • 31

1 Answers1

10

You were close. The extension method belongs to the Enumerable class. Try:

<see cref="Enumerable.SingleOrDefault{TSource}(IEnumerable{TSource})"/>
Ed Chapel
  • 6,842
  • 3
  • 30
  • 44
  • Thanks. I had tried all sorts of stuff, and it was getting quite annoying :) I hate that it was a simple oversight on my part, but I'm glad it's done. – harley.333 May 03 '14 at 17:10