Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

File Create Example in C#

using System;
using System.IO;
namespace FileHandlinDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            //Set the File Path
            string FilePath = @"D:MyFile.txt";
            FileStream fileStream = new FileStream(FilePath, FileMode.Create);
            fileStream.Close();
            Console.Write("File has been created and the Path is D:MyFile.txt");
            Console.ReadKey();
        }
    }
}
 
PREVIOUS NEXT
Tagged: #File #Create #Example
ADD COMMENT
Topic
Name
9+9 =