这是我的代码:
[AttributeUsage(AttributeTargets.Property)]
public class EncryptAttribute : Attribute
{
/// <summary>
/// If you use this attribute, database attribute size must be caclulated as such:
/// dbAttributeSize = (Math.Floor(fieldLength / 16) + 1) * 32
/// </summary>
public EncryptAttribute()
{
}
}
如您所见,如果用户选择使用Encrypt
属性,我希望在VisualStudio的Intellisense中向用户显示一个公式。
但是,摘要不会出现。我错过了什么?
感谢。
答案 0 :(得分:2)
在类级别应用摘要,而不是构造函数级别。
/// <summary>
/// If you use this attribute, database attribute size must be calculated as such:
/// dbAttributeSize = (Math.Floor(fieldLength / 16) + 1) * 32
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class EncryptAttribute : Attribute
{
public EncryptAttribute()
{
}
}
此外,您拼错了caclulated
,应该是calculated
。