Click here to Skip to main content
15,887,416 members
Home / Discussions / C#
   

C#

 
QuestionDemo Deployment Pin
eraser95014-Jun-10 3:17
eraser95014-Jun-10 3:17 
AnswerRe: Demo Deployment Pin
Johnny J.14-Jun-10 3:36
professionalJohnny J.14-Jun-10 3:36 
AnswerRe: Demo Deployment Pin
kasraa0009800014-Jun-10 4:34
kasraa0009800014-Jun-10 4:34 
QuestionClass methods for accessing/modifying multiple array variables Pin
BenBJT14-Jun-10 2:59
BenBJT14-Jun-10 2:59 
AnswerRe: Class methods for accessing/modifying multiple array variables Pin
Łukasz Nowakowski14-Jun-10 3:15
Łukasz Nowakowski14-Jun-10 3:15 
AnswerRe: Class methods for accessing/modifying multiple array variables Pin
Luc Pattyn14-Jun-10 3:26
sitebuilderLuc Pattyn14-Jun-10 3:26 
Questionhow i know when user created Pin
noamtzu0014-Jun-10 2:47
noamtzu0014-Jun-10 2:47 
AnswerRe: how i know when user created Pin
Pete O'Hanlon14-Jun-10 3:36
mvePete O'Hanlon14-Jun-10 3:36 
You can use DirectoryEntry to achieve this. Here's a sample piece of code:
public void FindUser(String userName)
{
       
  DirectoryEntry entry = GetDirectoryEntry(); // Get the directory entry you're interested in.
  DirectorySearcher search = new DirectorySearcher(entry);

  string filter = string.Format("(&(ObjectClass=user)(cn='{0}'))", userName);

  search.Filter = filter;

  foreach (SearchResult result in search.FindAll())
  {
    try
    {
       System.DirectoryServices.DirectoryEntry de = result.GetDirectoryEntry();
       Console.WriteLine("WhenCreated : " + de.Properties["WhenCreated"].Value.ToString());
       Console.WriteLine("User Name   : " + de.Properties["sAMAccountName"].Value.ToString());
    }
    catch (Exception ex)
    {
    }
  }
}

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



GeneralRe: how i know when user created Pin
noamtzu0014-Jun-10 18:33
noamtzu0014-Jun-10 18:33 
QuestionGetting a column or parameter's data type from the database [modified] Pin
JohnLBevan14-Jun-10 1:42
professionalJohnLBevan14-Jun-10 1:42 
AnswerRe: Getting a column or parameter's data type from the database Pin
PIEBALDconsult14-Jun-10 2:44
mvePIEBALDconsult14-Jun-10 2:44 
GeneralRe: Getting a column or parameter's data type from the database Pin
JohnLBevan14-Jun-10 8:40
professionalJohnLBevan14-Jun-10 8:40 
GeneralRe: Getting a column or parameter's data type from the database Pin
PIEBALDconsult14-Jun-10 13:48
mvePIEBALDconsult14-Jun-10 13:48 
QuestionA few questions Pin
SRJ9214-Jun-10 1:12
SRJ9214-Jun-10 1:12 
AnswerRe: A few questions Pin
Eddy Vluggen14-Jun-10 2:08
professionalEddy Vluggen14-Jun-10 2:08 
GeneralRe: A few questions Pin
SRJ9214-Jun-10 10:08
SRJ9214-Jun-10 10:08 
GeneralRe: A few questions Pin
Eddy Vluggen14-Jun-10 10:38
professionalEddy Vluggen14-Jun-10 10:38 
QuestionLogin dialog on page loads Pin
Ramkithepower14-Jun-10 0:39
Ramkithepower14-Jun-10 0:39 
AnswerWrong forum - Try the ASP.NET forum. Pin
Pete O'Hanlon14-Jun-10 0:42
mvePete O'Hanlon14-Jun-10 0:42 
AnswerRe: Login dialog on page loads Pin
OriginalGriff14-Jun-10 0:43
mveOriginalGriff14-Jun-10 0:43 
AnswerRe: Login dialog on page loads Pin
Ramkithepower14-Jun-10 22:21
Ramkithepower14-Jun-10 22:21 
QuestionScalable Email service Pin
nitin_ion14-Jun-10 0:28
nitin_ion14-Jun-10 0:28 
AnswerRe: Scalable Email service Pin
OriginalGriff14-Jun-10 0:45
mveOriginalGriff14-Jun-10 0:45 
GeneralRe: Scalable Email service Pin
nitin_ion14-Jun-10 1:15
nitin_ion14-Jun-10 1:15 
QuestionFlow control using Asynch Sockets Pin
TimSWatson14-Jun-10 0:14
TimSWatson14-Jun-10 0:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.