标签:
BinaryReader br; br = null; br = new BinaryReader(new FileStream("E:demo.txt", FileMode.Open)); FileStream demo = (FileStream)br.BaseStream; MessageBox.Show(demo.Name);
原理就是将BinaryReader实例化的对象中的basestream强制转换成filestream,然后读取fiestream的name就可以了
标签:
原文地址:http://www.cnblogs.com/hellochenchen/p/5526909.html