딱히 오류는 안뜨긴하는대


이거 일케하면 파일이 안생김;;


그냥 제목만잇는 txt 파일 생성하고 시픈대 어카죠


c# 독학중임 ㅠㅠ 




using System;

using System.IO;

namespace file_IO

{

    class Program

    {

        static void Main()

        {

            string Path = @"C:\";

            FileStream fs;




            string fileName = Path + "/TestFile.bin";


            try

            {

                fs = new FileStream(fileName, FileMode.Open);


                if (fs == null) throw new Exception();

            }

            catch(Exception)

            {

                Console.WriteLine("Input 파일을 열 수 없습니다 새로운 파일명 입력.");

                string name1 = Console.ReadLine();

                FileStream fs1 = new FileStream(name1, FileMode.CreateNew);


            }

            finally {

                Console.WriteLine("파일 만듬");


            

}



        }

    }

}