C# Filter AD search

I'm searching AD for user accounts that were created on or after a certain date, I'd like to just pull in the login id (samAccount).  Not sure how to modify the attached code to accomplish this.  Learning C# on the fly!  Thanks for any assistance.
public class MainClass {
    public static void Main() {
        using (DirectoryEntry de = new DirectoryEntry("LDAP://yourV/OU=yourV, DC=explorer, DC=local"))
        using (DirectorySearcher searcher = new DirectorySearcher()) {
            de.Username = @"explorer\yourName";
            de.Password = "password";
            searcher.SearchRoot = de;
            searcher.Filter = "(&(objectClass=user)(description=Auth*))";
            searcher.SearchScope = System.DirectoryServices.SearchScope.Subtree;
            searcher.PropertiesToLoad.Add("name");
            searcher.PropertiesToLoad.Add("description");
            searcher.PropertiesToLoad.Add("givenName");
            searcher.PropertiesToLoad.Add("wWWHomePage");
            searcher.Sort = new SortOption("givenName", SortDirection.Ascending);
            SearchResultCollection results = searcher.FindAll();
            foreach (SearchResult result in results) {
                ResultPropertyCollection props = result.Properties;
                foreach (string propName in props.PropertyNames) {
                    Console.Write(propName + ": ");
                    Console.WriteLine(props[propName][0]);
                }
            }
        }
    }
}

Open in new window

jasonbrandt3Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SriVaddadiCommented:
de.Properties["sAMAccountName"][0].ToString() gives you the login name
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jasonbrandt3Author Commented:
You're the man!
0
jasonbrandt3Author Commented:
where would I put that?  What about searchng by whenCreated?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.