读Txt文件
Posted xtwkh1973
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了读Txt文件相关的知识,希望对你有一定的参考价值。
System.IO.StreamReader m_streader;
InteropPermission m_Perm = new InteropPermission(InteropKind::ClrInterop);
Notes m_Notes;
str s;
int i=0;
container c;
;
m_Perm.assert();
m_streader = new System.IO.StreamReader(@"C:\\Test.txt");
while(int642int(m_streader.Peek())>0)
s = m_streader.ReadLine();
i++;
m_streader.Close();
m_streader.Dispose();
CodeAccessPermission::revertAssert();
以上是关于读Txt文件的主要内容,如果未能解决你的问题,请参考以下文章
java读取TXT文件 我把10万个数字存在了TXT文件中以空格分隔 我想读出来该怎么办(用java )