J
Jeff
hi
..net 2.0
I have a custom class:
public class Comment
{
private Guid _id;
private Guid _userid;
private Guid _article;
private Guid _parent;
private List<Comment> _replies;
public comment() {}
}
okay, my DAL return a list of all comments associated with an article. Some
of those comments might be replies to other comments etc. Now in my BLL (the
class above is within BLL) I want to fix this so that replies to another
comment is not added to the root list but to the comment they are replies
too....
My problem is how do I search my btree to locate where to put the comment,
maybe .NET Generics have some built in feature for this?
I started with this code:
Comment comment = GetCommentFromCommentDetails(record); //Get comment from
DAL
if (comment._parent == Guid.Empty) //if no parent, then add to root list
comments.Add(comment);
else
{
//Here I have to search the btree, not sure how?
}
any suggestions? any tips about how to display these comments in a data
presentation control is welcome too.
..net 2.0
I have a custom class:
public class Comment
{
private Guid _id;
private Guid _userid;
private Guid _article;
private Guid _parent;
private List<Comment> _replies;
public comment() {}
}
okay, my DAL return a list of all comments associated with an article. Some
of those comments might be replies to other comments etc. Now in my BLL (the
class above is within BLL) I want to fix this so that replies to another
comment is not added to the root list but to the comment they are replies
too....
My problem is how do I search my btree to locate where to put the comment,
maybe .NET Generics have some built in feature for this?
I started with this code:
Comment comment = GetCommentFromCommentDetails(record); //Get comment from
DAL
if (comment._parent == Guid.Empty) //if no parent, then add to root list
comments.Add(comment);
else
{
//Here I have to search the btree, not sure how?
}
any suggestions? any tips about how to display these comments in a data
presentation control is welcome too.