1

This object fills just fine

[DelimitedRecord("|")]
public class LvMenuItems
{
    public string Sequence { get; set; }
    public string DisplayText { get; set; }
    public string MenuId { get; set; }
    public string PageUrl { get; set; }
    public string ControlPanelSequence { get; set; }
}

[DelimitedRecord("|")]
public class LvMenuItems
{
    public string Sequence { get; set; }
    public string DisplayText { get; set; }
    public string MenuId { get; set; }
    public string PageUrl { get; set; }
    public string ControlPanelSequence { get; set; }

    [LVMenuItems]
    public LVMenutItems menu items {get; set;}
}

Is it possible to embed a copy of the same structure as an attribute of an object to introduce recurrsion?

phigits
  • 85
  • 2
  • 7
  • I should clarify that the second declaration errors out on the last line where we try to resuse the same object as an attribute within itself to enable recursion. – phigits May 03 '16 at 19:59

1 Answers1

1

I was going about this completely wrong. The correct way it to declare a single object that corresponds to the delimited file and then use that object to fill a second object that handles recursion.

phigits
  • 85
  • 2
  • 7