raja ramesh

raja ramesh

  • NA
  • 50
  • 108.3k

Read dat file in winforms applications

Nov 4 2011 8:54 AM
Hi,
I am working on winform applications

using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
.....
}

am writing above code to Read DAT file but some times I am getting following exception

"The process cannot access the file 'C:\data\myfile.dat' because it is being used by another process."

Can you tel me how to solve this problem ?

Answers (2)