2012-02-01 24 views
3

可能重複:
C#: How to reference generic classes and methods in xml documentation如何爲具有IDictionary <TKey,TValue>參數的函數創建文檔?

我想創建一個簡短的文檔(VS2010中)我其中有一個IDictionary<TKey, TValue>參數靜電功能。

例如:

public static string newDocument(IDictionary<string,string> listMap) 
{ 
//the code 
} 

我想創建VS2010一個文件,當你鍵入/三次,然後將產生類似如下自動:

/// <summary> 
/// create something 
/// </summary> 
/// <param name="listMap">Text here</param> 
/// <returns></returns> 
public static string newDocument(IDictionary<string,string> listMap) 
    { 
    //the code 
    } 

我想在這個寫方式:字典key是東西,字典value是別的東西。

如何做到這一點?

回答

1

StyleCop rules guide不提供任何記錄IDictionaries的規則。這是微不足道的,但我建議如下:

/// <param name="listMap">List map parameter representing xxx. The keys in the dictionary are XXX and the values are YYY</param> 
+0

我知道,但...也許我會這種格式,如果沒有其他方式 – 2012-02-01 17:39:06

相關問題