Answers for "c# file not exist than create txt"

C#
0

c# create file if not exists

string rootPath = Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System));
        rootPath += "MTN";
        if (!(File.Exists(rootPath)))
        {
            File.CreateText(rootPath);
        }
Posted by: Guest on October-15-2021

C# Answers by Framework

Browse Popular Code Answers by Language