I want to create a file that is in specific directory. For example: C:\x\y\z\aTextFile.txt
For this operation, I have to create the directory to create file.
Directory.CreateDirectory(@"C:\x\y\z\");
File.Create(@"C:\x\y\z\aTextFile.txt");
But I really wonder that I can do this operation in single line of code.
Any help and idea will be greately appreciated.