我有这个枚举:
/// <summary>
/// Accoun types enumeration
/// </summary>
public enum AcoountTypeTransaction
{
[Description("Account type debit")]
Debit = 0,
[Description("Account type Credit")]
Credit = 1
}
我想展示我的intellisense的描述,这只是一个样本,我有许多必须解释的枚举。有一种方法可以做到这一点
答案 0 :(得分:18)
使用XML document comments的方式与枚举声明本身的方式相同。
/// <summary>
/// Account types enumeration
/// </summary>
public enum AcoountTypeTransaction
{
/// <summary>
/// This is the Debug constant.
/// </summary>
[Description("Account type debit")]
Debit = 0,
/// <summary>
/// This is the Credit constant.
/// </summary>
[Description("Account type Credit")]
Credit = 1
}