Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# create file if not exists

string rootPath = Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System));
        rootPath += "MTN";
        if (!(File.Exists(rootPath)))
        {
            File.CreateText(rootPath);
        }
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to print c# 
Csharp :: replace double backslash with single backslash c# 
Csharp :: c# check if string is path or file 
Csharp :: .net core check if user is logged in 
Csharp :: c# object to dictionary 
Csharp :: where is c# used 
Csharp :: how to create a list in c# unity 
Csharp :: how to change color of a sprite in unity 
Csharp :: c# datagridview column size 
Csharp :: unity rotation 
Csharp :: unity default cube mesh 
Csharp :: c# cast to type variable 
Csharp :: unity c# 
Csharp :: C# delete folder with all contents 
Csharp :: topdown unity 
Csharp :: c# regex get matched string 
Csharp :: c# build string out of list of strings 
Csharp :: convert.tostring with datetime string 
Csharp :: two variable in one loop c# 
Csharp :: how to get the hour on c# 
Csharp :: unity object change sprite 
Csharp :: c# print console 
Csharp :: https request c# 
Csharp :: c# csv read write 
Csharp :: how to put double quotes in a string c# 
Csharp :: c# convert int to string 
Csharp :: unity actions 
Csharp :: get value from config file c# 
Csharp :: operator -- c# 
Csharp :: c# get folder path from file path 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =