Solved

How do I know that a DriectoryEntry has no children?

Posted on 2006-07-17
1
322 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 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can I do Unit Testing with Session ? 1 41
How we can add Dten600.dll in GAC in c#. 18 54
Pdf not loading 2 39
VS C# how to design libary of functions 7 33
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

739 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