25.14.txt

来自「《Microsoft Visual C# .NET 2003开发技巧大全》源代码」· 文本 代码 · 共 24 行

TXT
24
字号
Listing 25.14 An Attribute with a One-Parameter Constructor and an Optional
Property
[AttributeUsage(AttributeTargets.Class)]
public class FieldAttribute : Attribute
{
public FieldAttribute(string tableName)
{
this.tableName = tableName;
}
string tableName;
private int maxValue;
public int MaxValue
{
get
{
return maxValue;
}
set
{
maxValue = value;
}
}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?