public static void GetFormattedData(this BaseRecord rec, StringBuilder sb) { //if (rec is Record) // ((Record)rec).GetFormattedData(sb); if (rec is SubRecord) { ((SubRecord)rec).GetFormattedData(sb); } else { sb.Append(rec.GetDesc()); } }
public static void GetFormattedData(this BaseRecord rec, RTFBuilder rb) { if (rec is Record) { ((Record)rec).GetFormattedData(rb); } else if (rec is SubRecord) { ((SubRecord)rec).GetFormattedData(rb); } else { rb.Append(rec.GetDesc()); } }