Mohammad Aminul Islam Mohammad Aminul Islam - 2 months ago 5
C# Question

how to open a folder by clicking a button in windows form application

How to open a folder by clicking a button in windows form application



I am developing a project in windows form application where I have created PDF file.By clicking a button, I want to open the folder of PDF file where I have saved it.
so how can I do this?

N.B: I don't want to run any .exe file. I only want to open a folder.

Answer

This one should work

System.Diagnostics.Process.Start ("c:\\");

it opens the c drive in explorer for you

Comments