How to get full path of StreamWriter

 

In my version of the framework, this seems to work:

string fullPath = ((FileStream)(streamWriter.BaseStream)).Name;

(Found by debugging.)

原文地址:https://www.cnblogs.com/chucklu/p/11340050.html