代码运行的时候,CLR会自动寻找你的TableField这个attribute对应的class,然后进行相应的方法替换。
[TableField("Tel", SqlDbType.VarChar, 30)]最终对应到你的:
 public TableFieldAttribute(string sFieldName, SqlDbType oType, int iLength, bool bKey, bool IsUpdate, object oDefaultValue)
{
this._DefaultValue = null;
this._FieldName = sFieldName;
this._Type = oType;
this._Length = iLength;
this._Key = bKey;
this._IsUpdate = IsUpdate;
this._DefaultValue = oDefaultValue;
}
这个构造方法中