AddChild() public method

public AddChild ( string name ) : INode
name string
return INode
Example #1
0
        public void for_each_child()
        {
            var node = new JsonNode("Test");
            node.AddChild("a");
            node.AddChild("b");
            node.AddChild("c");

            var list = new List<string>();

            node.ForEachChild(x => list.Add(x.Name));

            list.ShouldHaveTheSameElementsAs("a", "b", "c");
        }