2005/Aug/08

http://csharphelp.com/board2/read.html?f=1&i=40143&t=40143
http://csharphelp.com/board2/search.html?f=1&search=export+listview&x=0&y=0

Comment

Comment:

Tweet


Read and Write to a Text File
http://csharp.codenewbie.com/articles/csharp/1434/Read_and_Write_to_a_Text_File-Page_1.html

using System.IO;

Reading a Text File:
static void Main(string[] args)
{
// create reader & open file
TextReader tr = new StreamReader("date.txt");

// read a line of text
Console.WriteLine(tr.ReadLine());

// close the stream
tr.Close();
}

Writting a Text File:
static void Main(string[] args)
{
// create a writer and open the file
TextWriter tw = new StreamWriter("date.txt");

// write a line of text to the file
tw.WriteLine(DateTime.Now);

// close the stream
tw.Close();
}
#3 by wsinw At 2005-08-10 01:39,
Loading from a text file into a listview plz help im a noobie
http://www.kdkeys.net/forums/4344/ShowPost.aspx

private void Read_Click(object sender, System.EventArgs e) {
// create reader & open file
TextReader tr = new StreamReader("c:\\test.txt");

// read a line of text

listBox1.Items.Add(tr.ReadLine());
// close the stream
tr.Close();
}
#2 by wsinw At 2005-08-10 01:36,