C# のドキュメント標準を調べ始めたところです。これが私が持っている方法です:
/// <summary>
/// Reformats a key in x.x format to 0x0x format
/// </summary>
/// <param name="dotFormatRowKey">key in ##.## format</param>
public static string DotFormatToRowKey(this string dotFormatRowKey)
{
if (! Regex.IsMatch(dotFormatRowKey, @"\d+\.\d+"))
throw new ArgumentException("Expected ##.##, was " + dotFormatRowKey);
var splits = dotFormatRowKey.Split('.')
.Select(x => String.Format("{0:d2}", Int32.Parse(x)))
.ToList();
var joined = String.Join(String.Empty, splits.ToArray())
return joined;
}
このメソッドの入力パラメーターと戻りパラメーターをどのように文書化するべきかについて、誰かがアドバイスをくれますか? また、これを行うと、VS2010 インテリセンスを使用している場合、文書化されたコメントを利用できますか?