请查阅:
public enum Environment.SpecialFolder

解决方案 »

  1.   

    System.CodeDom.Compiler.TempFileCollection ss = new System.CodeDom.Compiler.TempFileCollection();MessageBox.Show(ss.BasePath);
      

  2.   

    Environment.GetFolderPath(Environment.SpecialFolder.Templates)
      

  3.   

    用System.IO.Path.GetTempPath();如下例:string tmpPath = System.IO.Path.GetTempPath();
    string[] p = System.IO.Directory.GetFiles(tmpPath);
    for (int i=0; i<p.Length; i++)
    {
    System.Console.WriteLine(p[i]);
    }
    MessageBox.Show(tmpPath);
      

  4.   

    另有一个:
        Console.WriteLine("GetEnvironmentVariable: {0}  My temporary directory is {1}.", nl,
                               Environment.GetEnvironmentVariable("TEMP"));
      

  5.   

    TO:AhBian(阿扁) 
    Environment.GetFolderPath(Environment.SpecialFolder.Templates)得到的是:
    用作文档模板的公共储存库的目录。