namespace CustomerAttribute
{
[System.AttributeUsage(System.AttributeTargets.Property)]//只能对属性 (Property) 应用属性 (Attribute)。
class DataFieldAttribute : System.Attribute
{
private string _FieldName;
private string _FieldType;
public DataFieldAttribute(string fieldname, string fieldtype)
{
this._FieldName = fieldname;
this._FieldType = fieldtype;
}
public string FieldName
{
get { return this._FieldName; }
set { this._FieldName = value; }
}
public string FieldType
{
get { return this._FieldType; }
set { this._FieldType = value; }
}
}
{
[System.AttributeUsage(System.AttributeTargets.Property)]//只能对属性 (Property) 应用属性 (Attribute)。
class DataFieldAttribute : System.Attribute
{
private string _FieldName;
private string _FieldType;
public DataFieldAttribute(string fieldname, string fieldtype)
{
this._FieldName = fieldname;
this._FieldType = fieldtype;
}
public string FieldName
{
get { return this._FieldName; }
set { this._FieldName = value; }
}
public string FieldType
{
get { return this._FieldType; }
set { this._FieldType = value; }
}
}
}
using System;
using System.Collectio