如何使用 DelimitedClassBuilder 动态执行此操作,以便文件中的列可以扩展但不会破坏我的程序?
[DelimitedRecord(",")]
public class MyRecord
{
public string Name;
[FieldOptional, FieldArrayLength(0, 100)]
public string[] I_DONT_CARE_WHAT_COMES_AFTER_THIS;
}
即我该如何完成这个:
var cb = new DelimitedClassBuilder("xyz", ",");
cb.AddField("Name", "string");
... how do I add the array field here?
Type type = cb.CreateRecordClass();
var engine = new DelimitedFileEngine(type);