Question

I have a method like so:

/// <summary>
/// Gets a typed Dictionary of <see cref="T:System.Collections.Generic.Dictionary`2"/> 
/// </summary>
/// <returns></returns>
public Dictionary<string, object> ToDictionary()

When I invoke this method and look at the intellisense it shows it return Dictionary<TKey,TValue>

Is there a way for the intellisense to show Dictionary<string, object>

I tried the below but that fails:

<see cref="System.Collections.Generic.Dictionary`2[System.String,System.Object]"/>

Here's what I see:

enter image description here

Was it helpful?

Solution

This should work:

/// <summary>
/// Gets a typed Dictionary of <see cref="Dictionary{String, Object}" />
/// </summary>
/// <returns></returns>
public Dictionary<string, object> ToDictionary()
{
    return null;
}

OTHER TIPS

You 'could' declare the types at generic class level

public Dictionary<T, T2> ToDictionary()

Then use documentation such as

/// <typeparam name="T">The type of xxxx</typeparam>
/// <typeparam name="T2">The type of xxxx</typeparam>

Just a thought...

DC

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top