c# - File is being used by another Thread -


i reading data serial port , writing on text field using timer event , when writing data file in timer event method or serialdatareceived method. file being used thread. set fileshare.write , still having same problem.

from problem description, think trying write file 2 places timer event , serialdatareceived event. there chance of both trying access file @ same time. better , synchronizing block using lock. better understand problem if source code can shared.


Comments