If you need to select a directory in an “open file” dialog, you can use the following code :
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.ShowDialog();
string selected = dialog.SelectedPath;
The window will look like this :

If you need to select a directory in an “open file” dialog, you can use the following code :
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.ShowDialog();
string selected = dialog.SelectedPath;
The window will look like this :

If you want to have a modal form, make sure you call the ShowDialog method on it, like this :
YourForm form = new YourForm();
form.ShowDialog();
After coding a form with syntax highlighting support in :
I decided to give it a shot in C#. This was one fun experience! Even though it’s a static typed language, I really enjoyed the process, and I’m gonna continue the project in it. I really like some of the available controls and the native look on the applications.
Haven’t felt this way in a while.
I just spent about 2 hours with a very odd bug. Ok, maybe it’s not that odd if you know your C, but for me, it was a nasty experience. Dynamic allocation is not as easy as it seems.
I have a ( bad ) feeling that design patterns in C require you to make use of the preprocessor .
I think it’s been 2 years since I last used C#. I remember it was a fun experience, and I would like to get to know it better. Lambdas, extension methods, properties … This is nice
I’m tired of waiting for Java to catch up