TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Smith
NA
2k
0
LINQ HELP
Jul 25 2012 5:27 PM
I need some LINQ help.
I have an object (TreeNodeCollection) that contains an object (Nodes), also of type TreeNodeCollection. I wish to know how many of those sub-nodes have a count of not equal to zero. Below is the code I am using. There should be a better way to get the count other than selecting all the items and using the Count function. Can you help?
var a = from TreeNode x in nodes where x.Nodes.Count != 0 select x;
int numTasks = a.Count();
Reply
Answers (
2
)
how to enable a form from another form
Syntax meaning