?
Solved

How do I know that a DriectoryEntry has no children?

Posted on 2006-07-17
1
Medium Priority
?
329 Views
Last Modified: 2008-02-01
I'm building a treeview and a list view.  I need to know when I reached the end of the tree nodes, which means that node or directory entry has no children.  Is there a property or method in DirectoryEntry class that does this?  If not, how can I verify this?
--
Thanks.
0
Comment
Question by:lapucca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
whatsit2002 earned 2000 total points
ID: 17126707
lapucca,

Is this what you're looking for?

System.DirectoryServices.DirectoryEntry de = new System.DirectoryServices.DirectoryEntry();
if (de.Children.SchemaFilter.Count == 0)
  MessageBox.Show("It's empyt.");

Thanks.

Jason
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question