2
Answers

NP120 understanding instance

Maha

Maha

16y
1.9k
1

Hi Guys

 

NP120 understanding instance

 

FileStream fs = new FileStream ("aFile.txt", FileMode.Create, FileAccess.ReadWrite,FileShare.None);

 

StreamWriter sw = new StreamWriter(fs);

 

I have had a problem in understanding the above one. I wish to know whether it is correct to say instance of a StreamWriter which is sw is equal to instance of a FileStream which is fs. That means sw = fs.  

 

Please help me.

 

Thank you

Answers (2)