读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文件的主要内容,如果未能解决你的问题,请参考以下文章

如何存储 txt 文件(读/写)并为 Android 构建

R读 txt 文件

python实现读写txt文件

java读取TXT文件 我把10万个数字存在了TXT文件中以空格分隔 我想读出来该怎么办(用java )

请问一下 怎么用c语言实现读取一个txt文件里的数据 要按行读出来

C#读写txt文件