私人资料库
本博客大部分技术文章,均从网络搜索得来,旨在收集整理技术资料,文章版权归属原作者,由此引起的任何版权问题,与本人无关。

【转自】http://www.cnblogs.com/meceky/archive/2008/06/05/1214572.html

 

 1using System;
 2using System.Data;
 3using System.Configuration;
 4using System.Web;
 5using System.Web.Security;
 6using System.Web.UI;
 7using System.Web.UI.WebControls;
 8using System.Web.UI.WebControls.WebParts;
 9using System.Web.UI.HtmlControls;
10using System.Collections;
11using System.IO;
12
13/// <summary>
14/// file 的摘要说明
15/// </summary>

16public class file
17{
18    public file()
19    {
20        //
21        // TODO: 在此处添加构造函数逻辑
22        //
23    }

24    static void Main()
25    {
26        StreamReader objreader = new StreamReader("F:\\upfile\\t.txt");
27        string sline="";
28        ArrayList arrtext = new ArrayList();
29        while (sline != null)
30        {
31            sline = objreader.ReadLine();
32            if (sline != null)
33                arrtext.Add(sline);
34
35        }
 objreader.Close();
36        foreach(string ss in arrtext)
37            Console.WriteLine(ss);
38            Console.ReadLine();
39
40    }

41}

 

posted on 2008-08-27 17:04  该显示名称已被其他用户使用  阅读(423)  评论(0)    收藏  举报