I have this class:
public class TextFiller
{
public HtmlText Text { get; set; }
public string Details { get; set; }
}
What I need is to create a parent class that will consist of many TextFillers. I am wondering the best way to do this. Would it be best to do it using what I have on line a, line b or is there some better solution?
public class TextFillerParent
{
public TextFiller[] TextFiller { get; set; } <<< a
public IEnumerable<TextFiller> TextFiller { get; set; } <<< b
}
What I will be doing is storing the data in Azure so I will want to be able to serialize TextFillerParent into a JSON string. Will there be any difference if the contents of TextFillerParent are an array of TextFiller or if I use the IEnumberable? Are there advantages in using IEnumerable?
I MUST be able to set the value of individual TextFiller. I know I can do this with an array but can I also do that if I use IEnumerable or is IEnumerable only good for sequential access?
Thank you.