Skip to content

Instantly share code, notes, and snippets.

@cz75hiro
Created August 28, 2010 18:20
Show Gist options
  • Save cz75hiro/555416 to your computer and use it in GitHub Desktop.
Save cz75hiro/555416 to your computer and use it in GitHub Desktop.
public class testClass : RecursionBase<testClass> {
public testClass() {
this.Name = "oya";
//Addしてみる
this.Children.Add(new testClass() { Name = "ko1" });
this.Children[0].Children.Add(new testClass() { Name = "mago1" });
//AddRangeしてみる
var children = new RecursionCollection(this);
children.Add(new testClass() { Name = "ko2" });
children.Add(new testClass() { Name = "ko3" });
this.Children.AddRange(children);
}
public string Name { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment