If you're on .NET 3.5 and up, you should check out the System.DirectoryServices.AccountManagement
(S.DS.AM) namespace. Read all about it here:
Basically, you can define a domain context and easily find users and/or groups in AD:
// set up domain context
using (PrincipalContext ctx = new PrincipalContext(ContextType.Domain))
{
// find a user
UserPrincipal user = UserPrincipal.FindByIdentity(ctx, "SomeUserName");
if(user != null)
{
// GetAuthorizationGroups returns a list of GroupPrincipals and work recursively
var groupsForUser = user.GetAuthorizationGroups();
// then check to see if that group you want it part of this list
}
}
The new S.DS.AM makes it really easy to play around with users and groups in AD!