示例#1
0
        public static NestedClass Create(int deep)
        {
            var parent = new NestedClass();

            AppendChild(parent, deep);
            return(parent);
        }
示例#2
0
        public static void AppendChild(NestedClass parent, int deep)
        {
            var child = new NestedClass();

            parent.Nested = child;
            if (deep > 0)
            {
                AppendChild(child, --deep);
            }
        }