Hero is coming back

风吹呀吹

风会指引你前进的方向

C# 创建文件

 public void createHtml(string fileName, string path)
        {
            path = System.IO.Path.Combine(path, fileName);
            Console.WriteLine("Path to my file: {0}\n", path);
            if (!System.IO.File.Exists(path))
            {
                using (System.IO.FileStream fs = System.IO.File.Create(path));
            }
            else
            {
                Console.WriteLine("File \"{0}\" already exists.", fileName);
                return;
            }
        }

 

posted @ 2017-11-15 12:48  风吹呀吹  阅读(350)  评论(0编辑  收藏  举报