■■■

2016年4月8日金曜日

ファイルを新規で作成する方法

ファイルを新規で作成する方法
VB.NET
        ' ファイルを新規作成する方法
        Using strmCreate As System.IO.FileStream = System.IO.File.Create("C:\createnew.txt")
            ' 終了
            If strmCreate IsNot Nothing Then
                strmCreate.Close()
            End If

        End Using
【送料無料】グレープシティInputMan for Windows Forms 8.0J 1開…
C#
            // ファイルを新規作成する方法
            using (System.IO.FileStream strmCreate = System.IO.File.Create(@"C:\createnew.txt"))
            {
                // 終了
                if (strmCreate != null)
                {
                    strmCreate.Close();
                }

            }

■■■