myBook 개체가 있습니다.C에서 트리 구조 구현
그런 종류의 데이터에 대해 더 나은 구조를 구현할 수 있습니까? 제 생각에는
public class myRow{
public int ID = 0;
public int number = 0;
public String param1 = null;
public decimal param2 = null;
public string parm3 = "";
public int param4 = null;
}
public class mySubChapter{
public int ID = 0;
public string title = "";
public List<myRow> rows;
internal bool sort(){...} //sort rows by ID
}
public class myChapter{
public int ID = 0;
public string title = "";
public List<mySubChapter> subChapters;
internal bool sort(){...} //sort subChapters by ID
}
public class myBook{
public int ID = 0;
public string title = ""
public List<myChapter> chapters;
internal bool sort(){...} //sort chapters by ID
}
이 데이터 구조는 어떤 용도로 사용됩니까? 전체 책의 텍스트를 도서관 카탈로그에 보관하고 싶습니까? – PMF
@PMF 내가 개체의 모든 데이터를 저장합니다, 나는 그것을 serialize하고 다른 클라이언트로 전송해야합니다. – eyalb