Liszt 23 Junior Poster

I have a ThirdPart program that appends text to a file randomly. I dont know how this code is doing this, thinking of opening and closing the file.

I have simulated that scenario by:
//Process 1 Appends Text to File
//Process 2 Reads Text From File


Now I am writing a code that will be able to Read this same file.
In the code below, both for the appending to file and read to file, I dont ->Close() the files.
(If I close the files, it will work, but this is happening in a following order)

If I run this code the reading code will tell that the file cannot be red because it is used by another process(appending process).

So my question is.
How could it be possible for these 2 processes to append and read to the file even if the file is used by the other process.
Like even if the code is appending to the file(ThirdPart Program), I will have the oppurtunity to read from the file anyway at the exact same time.

Perheps my question is that I want to be able to read a file that is used by another process ?

//Process 1 Appends Text to File

FileStream^ sb = gcnew FileStream("C:\\test1.txt", FileMode::Append);
StreamWriter^ bk = gcnew StreamWriter(sb);

bk->WriteLine("textString");
bk->NewLine;




//....................................................................
//Process 2 Reads Text From File

     StreamReader^ sr = gcnew StreamReader("C:\\test1.txt");
     String^ Line;

      while( sr->Peek() >= 0 )
      {
	 Line = sr->ReadLine();
      }