I have the following class:
public class NoteLink
{
public IList<NoteLinkDetail> NoteLinkDetails
{
get { return _noteLinkDetails; }
}
private List<NoteLinkDetail> _noteLinkDetails = new List<NoteLinkDetail>();
public NoteLink()
{
_noteLinkDetails = new List<NoteLinkDetail>();
}
}
and then another class that's used just within the first class.
public class NoteLinkDetail
{
public string L { get; set; }
public string R { get; set; }
}
Is there anything I could do to optimize this. I DO need the second class as I use JSON to store the contents of NoteLinkDetail in a string. However is there such a thing as an inner class in C#? Any recommendation on how I could optimize this code? Thanks.