|
-
May 22nd, 2006, 11:05 PM
#1
Thread Starter
Hyperactive Member
[2.0] Need to read and Ascii file
Howdy all,
I need to read ascii files (comma separated) using C# .
Which libraries or namespaces should I be using to accomplish.
thanks
nath
-
May 22nd, 2006, 11:53 PM
#2
Re: [2.0] Need to read and Ascii file
You can use ADO.NET to access CSV files in a folder as though they were tables in a database. As is always the case with ADO.NET, it is almost exactly the same as using any other data source. See www.connectionstrings.com for more details.
Alternatively you can use a StreamReader to read the file all at once or line by line. You can then use the String.Split method to separate a line into an array of strings with the delimiters removed. There are examples all over the forums, although the majority may be in VB.NET.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|