Suppose I have string variable string id='sample'. I want to make a file named sample.txt in my current directory (Environment.CurrentDirectory) using the string variable and after that I want to get the full path of the text file. How will I do that? Normally we can create a text file(say: sample.txt) in current directory in this way:
string path=Directory.GetCurrentDirectory();
string FileName = path + "\\sample.txt";
File.Create(FileName);
But how will I do this using the string variable and after creation how will I get the full path of the sample.txt file?