How can I get special system directory?
How can I get special system directory?
I want to know special system directory? such as c:\Windows c:\windows\system32 ...
what do I do?
I see the following code from a sample
openFileDialog1.InitialDirectory="%SystemRoot%"; // it work well
openFileDialog1.ShowDialog();
I think the code should be the below:
openFileDialog1.InitialDirectory=Environment.ExpandEnvironmentVariables("%SystemRoot%");
openFileDialog1.ShowDialog();
Why does openFileDialog1.InitialDirectory="%SystemRoot%" work well?
but the following ...
string path=Environment.ExpandEnvironmentVariables("%SystemRoot%\\"+"1.jpg"); //OK
string path="%SystemRoot%\\"+"1.jpg"; //it doesn't work, why?

