【发布时间】:2013-08-13 06:18:46
【问题描述】:
我正在使用 FileHelpers 写出固定长度的文件。
public class MyFileLayout
{
[FieldFixedLength(2)]
private string prefix;
[FieldFixedLength(12)]
private string customerName;
public string CustomerName
{
set
{
this.customerName= value;
**Here I require to get the customerName's FieldFixedLength attribute value**
}
}
}
如上所示,我想在属性的 set 方法中访问自定义属性值。
我如何做到这一点?
【问题讨论】:
标签: c# attributes filehelpers