Click here to Skip to main content
15,893,508 members
Home / Discussions / C#
   

C#

 
AnswerRe: Overloaded Methods with Generics Pin
James Curran7-Apr-20 4:48
James Curran7-Apr-20 4:48 
QuestionWpf Excel Pin
RajaMohammed.A26-Mar-20 3:55
RajaMohammed.A26-Mar-20 3:55 
AnswerRe: Wpf Excel Pin
Richard MacCutchan26-Mar-20 4:12
mveRichard MacCutchan26-Mar-20 4:12 
AnswerRe: Wpf Excel Pin
jsc422-Apr-20 2:58
professionaljsc422-Apr-20 2:58 
QuestionC# Oracle SYSDBA connection string not able to working on windows 10? Pin
barathsamkumar25-Mar-20 4:39
barathsamkumar25-Mar-20 4:39 
AnswerRe: C# Oracle SYSDBA connection string not able to working on windows 10? Pin
OriginalGriff25-Mar-20 5:13
mveOriginalGriff25-Mar-20 5:13 
AnswerRe: C# Oracle SYSDBA connection string not able to working on windows 10? Pin
ZurdoDev25-Mar-20 10:07
professionalZurdoDev25-Mar-20 10:07 
QuestionUser List Pin
Richard Andrew x6423-Mar-20 10:40
professionalRichard Andrew x6423-Mar-20 10:40 
I am using the below code to obtain a list of all local user accounts on the machine. But in addition to the "human" accounts, it returns all the other accounts, such as the SQLSERVER accounts and something called the WDAGUtilityAccount.

What is the property I should be checking for to determine which listed accounts are the "human" accounts, and which are machine accounts?

C#
public static List<string> GetComputerUsers()
{
    List<string> users = new List<string>();
    var path =
        string.Format("WinNT://{0},computer", Environment.MachineName);

    using (var computerEntry = new DirectoryEntry(path))
    {
        foreach (DirectoryEntry childEntry in computerEntry.Children)
        {
            if (childEntry.SchemaClassName == "User")
            {
                users.Add(childEntry.Name);
            }

        }
    }

return users;
}




The difficult we do right away...
...the impossible takes slightly longer.

AnswerRe: User List Pin
Luc Pattyn23-Mar-20 16:25
sitebuilderLuc Pattyn23-Mar-20 16:25 
GeneralRe: User List Pin
Richard Andrew x6424-Mar-20 2:06
professionalRichard Andrew x6424-Mar-20 2:06 
GeneralRe: User List Pin
Dave Kreskowiak25-Mar-20 4:13
mveDave Kreskowiak25-Mar-20 4:13 
AnswerRe: User List Pin
Randor 25-Mar-20 5:11
professional Randor 25-Mar-20 5:11 
GeneralRe: User List Pin
Richard Andrew x6425-Mar-20 5:33
professionalRichard Andrew x6425-Mar-20 5:33 
GeneralRe: User List Pin
Randor 25-Mar-20 6:10
professional Randor 25-Mar-20 6:10 
GeneralRe: User List Pin
Richard Andrew x6425-Mar-20 6:22
professionalRichard Andrew x6425-Mar-20 6:22 
GeneralRe: User List Pin
Randor 25-Mar-20 8:38
professional Randor 25-Mar-20 8:38 
GeneralRe: User List Pin
Richard Andrew x6425-Mar-20 8:57
professionalRichard Andrew x6425-Mar-20 8:57 
GeneralRe: User List Pin
Randor 25-Mar-20 9:18
professional Randor 25-Mar-20 9:18 
AnswerRe: User List Pin
Randor 25-Mar-20 13:27
professional Randor 25-Mar-20 13:27 
GeneralRe: User List Pin
Richard Andrew x6425-Mar-20 13:36
professionalRichard Andrew x6425-Mar-20 13:36 
GeneralRe: User List Pin
Richard Andrew x6427-Mar-20 14:37
professionalRichard Andrew x6427-Mar-20 14:37 
QuestionMutlithreading application threading and semaphores? Pin
auting8223-Mar-20 0:52
auting8223-Mar-20 0:52 
GeneralRe: Mutlithreading application threading and semaphores? Pin
Richard MacCutchan23-Mar-20 3:58
mveRichard MacCutchan23-Mar-20 3:58 
GeneralRe: Mutlithreading application threading and semaphores? Pin
auting8223-Mar-20 4:14
auting8223-Mar-20 4:14 
GeneralRe: Mutlithreading application threading and semaphores? Pin
Dave Kreskowiak23-Mar-20 4:36
mveDave Kreskowiak23-Mar-20 4:36 

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.