How do I use the OpenFileDialog class (in C#, WPF etc.) such that it opens on the Network area as default?
This does not work:
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "Network";
I also tried having “\” as an InitialDirectory and that did not work.
I also tried having “\\” as an InitialDirectory and that did not work either.
I haven’t tried it, but this should work:
Environment.GetFolderPathreturns the path corresponding to anEnvironment.SpecialFolderenumeration entry as a string.Environment.SpecialFolder.NetworkShortcutsis defined as