Creting and writting text file
Dear friends
I am creating on .txt file like this
FileStream fileStream = new FileStream(@"C:\mayur.txt", FileMode.Create);
file is created
on next line i am trying to initialise one writer
TextWriter sw = new StreamWriter(@"C:\\mayur.txt");
but it is giving error file is being used by another person on this line
when I create file manually and then this code works fine but this i am not creating file in code
How to solve this problem