Data structure for category
问题 I am looking for a data structure to add, remove, get, and find on categories. For example: Books Drama Science fiction Other Sports Cycling Golf Team Sports Soccer Football etc. I think about using tree from the C5 collection library for example, but it looks like it has only red-black trees. Any suggestions? 回答1: You can just create a Category class that exposes a list of other Category instances. public class Category { public Category() { this.ChildCategories = new List<Category>(); }