Solved

How do I know that a DriectoryEntry has no children?

Posted on 2006-07-17
1
307 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
1 Comment
 
LVL 7

Accepted Solution

by:
whatsit2002 earned 500 total points
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now