I have created a wpf application in that I have the requirement to create a folder and in that folder I want a text file to be created dynamically in the application installed folder
C:\Program Files (x86)\MyApplication\NewFolder\Mytext.txt\
like wise.
I've tried the following code but it is not getting
using System.IO;
private void CreateIfMissing(string path)
{
bool folderExists = Directory.Exists(Server.MapPath(path));//Here i don't understand what is server i think this will work in ASP.NET
if (!folderExists)
Directory.CreateDirectory(Server.MapPath(path));
}
How to acheive this?