❔ C# list user local PC vers ComboBox
Good morning or good evening,
I'm new to C# and looking to list my local pc's users in a combobox on my WindowsFormsApp project.
I've tried lots of stuff, but nothing seems to work.
I also searched on the internet but not much information...
If anyone could help me that would be great!
Good evening to you !
ps: here is my code just in case (i think it is poorly optimized i think)
8 Replies
Have you ever tried placing a breakpoint within your
GetUserList
method to check what's actually going wrong?
As far as I can tell, you're using the wrong event handler to populate your ComboBox.I don't know very well the possibilities of Breakpoints so I tested other things
Even with this code I have no result
on the other hand if I accept this code in console output I do have a cmd which opens and which gives me the correct users of my pc
You should learn a bit about debugging your code in Visual Studio. Using breakpoints is the most basic method of testing what your code does.
Do you have an example for me to understand how breakpoints work?
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.