C
C#2y ago
JNeils

❔ 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
SuperBrain
SuperBrain2y ago
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.
JNeils
JNeilsOP2y ago
I don't know very well the possibilities of Breakpoints so I tested other things
JNeils
JNeilsOP2y ago
JNeils
JNeilsOP2y ago
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
SuperBrain
SuperBrain2y ago
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.
JNeils
JNeilsOP2y ago
Do you have an example for me to understand how breakpoints work?
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server