随即加载.txt里面的内容(最后分求,天啊搞不定的话要炒鱿鱼了) 比如有3个个txt文件,我想随即加载里面的内容这么写代码呢?我刚学,最好有详细代码您的帮助我将不胜感激搞不定的话要炒鱿鱼了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 TextReader reader = new StreamReader(@"编码.txt",System.Text.Encoding.GetEncoding("GB2312"));while((str = reader.ReadLine()) != null){.....str就是文件的行的信息!}reader.Close(); string[] paths = { "A.txt", "B.txt", "C.txt" }; Random x = new Random(); string path = paths[x.Next(0, 3)]; System.IO.StreamReader reader = new System.IO.StreamReader(path); MessageBox.Show(reader.ReadLine()); winform中,TreeView如何只展开一级节点 帮忙测试一下这段存储过程 求助高手指点c#和tcl 如何改变toolstrip的溢出顺序 【在线等】Excel 读取指定行列数据! sql2005数据库定时自动备份错误 局域网即时通信系统资源严重占用,合理的思路应该如何? 有子查询的SQl如何使用啊? (菜鸟问题)为什么我的数据库update不了,急啊!!! treeview的问题: 关于DATATABLE和DATAGRID的问题,请大家帮帮忙!!!~~~ 关于Dispose方法
while((str = reader.ReadLine()) != null)
{
.....str就是文件的行的信息!
}
reader.Close();
Random x = new Random();
string path = paths[x.Next(0, 3)];
System.IO.StreamReader reader = new System.IO.StreamReader(path);
MessageBox.Show(reader.ReadLine());