2

I'm trying to make some examples for a method but I just can't make it work. The generic parameters are never highlighted. What's the correct syntax?

/// <summary>
/// <example>
/// Example:
/// <code>
/// <see cref="Dictionary{int, object}"/> map = list.CreateMap(x => object.Field)
/// </code>
/// </example>
/// </summary>
public Dictionary<TU, T> CreateMap<TU>(Func<T, TU> fieldSelector)
{
}
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • You have some errors in your function - missing type paramete `T` and missing a notnull constraint: `public Dictionary CreateMap(Func fieldSelector) where TU: notnull` – Jay Buckman Sep 01 '22 at 10:53

0 Answers0