在具有單個構造函數C#類,我可以添加類摘要XML文檔和構造XML文檔:歸檔F#代碼
///<summary>
///This class will solve all your problems
///</summary>
public class Awesome
{
/// <summary>
/// Initializes a new instance of the <see cref="Awesome"/> class.
/// </summary>
/// <param name="sauce">The secret sauce.</param>
public Awesome(string sauce)
{
//...implementation elided for security purposes
}
}
我如何做同樣的等效F#類等生成的文檔是是一樣的嗎?
type Awesome(sauce: string) =
//...implementation elided for security purposes
澄清:我知道標準的XML文檔標籤可以在F#中使用。我的問題是如何將它們添加到上面的代碼片段中,以便類型和構造函數都被記錄下來。
+1良好的漁獲物。我不認爲有辦法做到這一點:-( – 2013-02-28 02:12:56