Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# create file

System.IO.File.Create(@"C:WhateverFolderWhateverFile.txt");
Comment

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();
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity check load scene 
Csharp :: unity print name of button when click on it 
Csharp :: alphabet string[] c# 
Csharp :: c# shuffle array 
Csharp :: unity hide in inspector 
Csharp :: c# swap variables 
Csharp :: group by linq multiple columns c# 
Csharp :: json get request c# 
Csharp :: parse int in c# 
Csharp :: best way to compare byte array c# 
Csharp :: video gets pixelated unity 
Csharp :: how to play animation with code in unity 
Csharp :: cs entity framework 
Csharp :: get date value from datepicker c# 
Csharp :: c# error CS0515 
Csharp :: how to use file watcher in c# 
Csharp :: c# initialize empty list 
Csharp :: unity how to load a scene 
Csharp :: how do I print something in the console at the start of the game unity 
Csharp :: c# tostring currency 
Csharp :: call stored proc c# 
Csharp :: how to make multiplayer game in unity 
Csharp :: asp net c# compare date to current 
Csharp :: topdown unity 
Csharp :: return json from controller c# 
Csharp :: c# return switch 
Csharp :: csharp sleep code 1 second 
Csharp :: c# loop string array 
Csharp :: c# read authorization header 
Csharp :: c# get type of object 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =