0
我有一個非常簡單的問題,您將如何用xmldoc記錄一個方法或具有通用Action或Func返回類型的屬性。 例如:如何在方法或屬性中記錄返回類型爲通用Action或Func的類型參數
/// <summary>
/// Gets or sets the print method. Parameters: file, printer name???
/// </summary>
/// <value>
/// The print method.
/// </value>
public Action<string, string> PrintMethod { get; set; }
這是哪種情況下的最佳做法?
這是一個很好的建議!但問題不在於是使用Action還是Func作爲屬性或方法的返回類型,而不是如何記錄它。 – 2012-03-22 11:28:53
@Shurup,我的觀點是沒有「乾淨」的方式來記錄Action或Func的參數;如果您需要這樣做,請創建一個可以記錄參數的特定代理。 – 2012-03-22 13:14:05