Eindoofus
asked on
Seeking an explanation of how a "ReadOnlyCollection" works in this given case?
I'm trying to find out what is happening in the following lines and I'm new to the "ReadyOnlyCollection." I was hoping someone could explain it to me. I'm especially confused about the line:
_children = new ReadOnlyCollection<Node>(_ intChildre n);
_children = new ReadOnlyCollection<Node>(_
public Node Parent { get; }
private List<Node> _intChildren;
private ReadOnlyCollection<Node> _children;
public ReadOnly Collection<Node> Children
{
get
{
if (_children == null)
_children = new ReadOnlyCollection<Node>(_intChildren);
return _children;
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER