<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: C# Read Text File Line-by-Line</title>
	<atom:link href="http://www.csharp411.com/c-read-text-file-line-by-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csharp411.com/c-read-text-file-line-by-line/</link>
	<description>C# Information, Code, Tips and News</description>
	<lastBuildDate>Sat, 24 Jul 2010 01:26:51 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: C# &#8211; Lendo um arquivo texto linha a linha &#124; Tomás Vásquez - Blog</title>
		<link>http://www.csharp411.com/c-read-text-file-line-by-line/comment-page-1/#comment-5582</link>
		<dc:creator>C# &#8211; Lendo um arquivo texto linha a linha &#124; Tomás Vásquez - Blog</dc:creator>
		<pubDate>Thu, 15 Jul 2010 00:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/c-read-text-file-line-by-line/#comment-5582</guid>
		<description>[...] código se baseou no exemplo do colega timm, mas dei uma simplificada, deixando o código bem mais [...]</description>
		<content:encoded><![CDATA[<p>[...] código se baseou no exemplo do colega timm, mas dei uma simplificada, deixando o código bem mais [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://www.csharp411.com/c-read-text-file-line-by-line/comment-page-1/#comment-5579</link>
		<dc:creator>john</dc:creator>
		<pubDate>Sun, 11 Jul 2010 22:42:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/c-read-text-file-line-by-line/#comment-5579</guid>
		<description>IS there a way to read from a txt file line by line and string each individual line For example:
Lets say line one from the file is birthday
i want it to string birthday as birthdate then go to the next line and string as something else. 

Please help!</description>
		<content:encoded><![CDATA[<p>IS there a way to read from a txt file line by line and string each individual line For example:<br />
Lets say line one from the file is birthday<br />
i want it to string birthday as birthdate then go to the next line and string as something else. </p>
<p>Please help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nguyen phuoc duy</title>
		<link>http://www.csharp411.com/c-read-text-file-line-by-line/comment-page-1/#comment-5571</link>
		<dc:creator>nguyen phuoc duy</dc:creator>
		<pubDate>Tue, 06 Jul 2010 21:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/c-read-text-file-line-by-line/#comment-5571</guid>
		<description>i have a project:
&quot; create index index on a text file, for creating an index, the user will be requried to specify the name of the file on which the index needs to be created and the name of the index file. if index has already been created on a file, a user should not be required to create it again the next time an operation is to performed on the file..
and load  the files by index file
i&#039;m learn programming in C#, 3 months ago
this project required write in windowapplication.
help me! thanks so much</description>
		<content:encoded><![CDATA[<p>i have a project:<br />
" create index index on a text file, for creating an index, the user will be requried to specify the name of the file on which the index needs to be created and the name of the index file. if index has already been created on a file, a user should not be required to create it again the next time an operation is to performed on the file..<br />
and load  the files by index file<br />
i'm learn programming in C#, 3 months ago<br />
this project required write in windowapplication.<br />
help me! thanks so much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nicolas</title>
		<link>http://www.csharp411.com/c-read-text-file-line-by-line/comment-page-1/#comment-5417</link>
		<dc:creator>nicolas</dc:creator>
		<pubDate>Mon, 05 Apr 2010 19:38:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/c-read-text-file-line-by-line/#comment-5417</guid>
		<description>Hi Timm,

Is it possible to have this code read all line in a csv file like:

HD,dtv,bill,1234
CA,021502011,1234567890,0,12.45,,emmanuel de la cruz,las lomas,san juan,pr,00921
CA,023424555,3422354524,0,453.98,,ninette fonseca,rexile,bayamon,pr,00957

and select a field value from each line and sum it starting from the 2nd line?

Thanks in advanced.</description>
		<content:encoded><![CDATA[<p>Hi Timm,</p>
<p>Is it possible to have this code read all line in a csv file like:</p>
<p>HD,dtv,bill,1234<br />
CA,021502011,1234567890,0,12.45,,emmanuel de la cruz,las lomas,san juan,pr,00921<br />
CA,023424555,3422354524,0,453.98,,ninette fonseca,rexile,bayamon,pr,00957</p>
<p>and select a field value from each line and sum it starting from the 2nd line?</p>
<p>Thanks in advanced.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://www.csharp411.com/c-read-text-file-line-by-line/comment-page-1/#comment-5403</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Mon, 15 Mar 2010 17:50:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/c-read-text-file-line-by-line/#comment-5403</guid>
		<description>I have a CSV file that I open w/ C# via inline = rdr.ReadLine();While (inline != null)  wrtr.writeline(blah blah....Wrtr.closeHow can I insert a new column in position number 27?</description>
		<content:encoded><![CDATA[<p>I have a CSV file that I open w/ C# via inline = rdr.ReadLine();While (inline != null)  wrtr.writeline(blah blah&#8230;.Wrtr.closeHow can I insert a new column in position number 27?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timm</title>
		<link>http://www.csharp411.com/c-read-text-file-line-by-line/comment-page-1/#comment-5396</link>
		<dc:creator>timm</dc:creator>
		<pubDate>Tue, 02 Mar 2010 14:40:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/c-read-text-file-line-by-line/#comment-5396</guid>
		<description>@Jovit, here&#039;s a code snippet that may do what you want.  You&#039;ll need to add error-handling, check to ensure the input files are the same length, strip any whitespace, etc.  This also wouldn&#039;t be the best approach for very large files, but hopefully you get the idea.

string[] lines1 = File.ReadAllLines( &quot;file1.txt&quot; );
string[] lines2 = File.ReadAllLines( &quot;file2.txt&quot; );
string[] lines3 = File.ReadAllLines( &quot;file3.txt&quot; );
StringBuilder sb = new StringBuilder();
int count = lines1.Length;
for (int i = 0; i &lt; count; i++)
{
	string line = String.Format( &quot;{0} , {1} , {2}&quot;, lines1[i], lines2[i], lines3[i] );
	sb.AppendLine( line );
}
File.WriteAllText( &quot;output.txt&quot;, sb.ToString() );</description>
		<content:encoded><![CDATA[<p>@Jovit, here's a code snippet that may do what you want.  You'll need to add error-handling, check to ensure the input files are the same length, strip any whitespace, etc.  This also wouldn't be the best approach for very large files, but hopefully you get the idea.</p>
<p>string[] lines1 = File.ReadAllLines( "file1.txt" );<br />
string[] lines2 = File.ReadAllLines( "file2.txt" );<br />
string[] lines3 = File.ReadAllLines( "file3.txt" );<br />
StringBuilder sb = new StringBuilder();<br />
int count = lines1.Length;<br />
for (int i = 0; i < count; i++)<br />
{<br />
	string line = String.Format( "{0} , {1} , {2}", lines1[i], lines2[i], lines3[i] );<br />
	sb.AppendLine( line );<br />
}<br />
File.WriteAllText( "output.txt", sb.ToString() );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jovit</title>
		<link>http://www.csharp411.com/c-read-text-file-line-by-line/comment-page-1/#comment-5394</link>
		<dc:creator>jovit</dc:creator>
		<pubDate>Tue, 02 Mar 2010 04:00:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/c-read-text-file-line-by-line/#comment-5394</guid>
		<description>hello, i&#039;m a student studying C# because of our final project..can anyone help me please about merging three text files which are from saved points gathered from zedgraph to be separated by comma..
for example

file1.txt contains
1
2
3
file2.txt contains
4
5
6
file3.txt contains
7
8
9
through which i need to have an output of

1 , 4 , 7
2 , 5 , 8
3 , 6 , 9
...thank you in advance.. this is very urgent and important..if you have any codes available..tnx.</description>
		<content:encoded><![CDATA[<p>hello, i'm a student studying C# because of our final project..can anyone help me please about merging three text files which are from saved points gathered from zedgraph to be separated by comma..<br />
for example</p>
<p>file1.txt contains<br />
1<br />
2<br />
3<br />
file2.txt contains<br />
4<br />
5<br />
6<br />
file3.txt contains<br />
7<br />
8<br />
9<br />
through which i need to have an output of</p>
<p>1 , 4 , 7<br />
2 , 5 , 8<br />
3 , 6 , 9<br />
&#8230;thank you in advance.. this is very urgent and important..if you have any codes available..tnx.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hightechrider</title>
		<link>http://www.csharp411.com/c-read-text-file-line-by-line/comment-page-1/#comment-5351</link>
		<dc:creator>Hightechrider</dc:creator>
		<pubDate>Sat, 02 Jan 2010 04:12:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/c-read-text-file-line-by-line/#comment-5351</guid>
		<description>A using() statement on the StreamReader would make this shorter and neater.</description>
		<content:encoded><![CDATA[<p>A using() statement on the StreamReader would make this shorter and neater.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zezo</title>
		<link>http://www.csharp411.com/c-read-text-file-line-by-line/comment-page-1/#comment-5318</link>
		<dc:creator>zezo</dc:creator>
		<pubDate>Thu, 29 Oct 2009 06:45:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/c-read-text-file-line-by-line/#comment-5318</guid>
		<description>I need to get the line previous of the current line

there are any way to do this ???</description>
		<content:encoded><![CDATA[<p>I need to get the line previous of the current line</p>
<p>there are any way to do this ???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zaman</title>
		<link>http://www.csharp411.com/c-read-text-file-line-by-line/comment-page-1/#comment-5308</link>
		<dc:creator>Zaman</dc:creator>
		<pubDate>Wed, 21 Oct 2009 09:37:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/c-read-text-file-line-by-line/#comment-5308</guid>
		<description>Thanks....it works....</description>
		<content:encoded><![CDATA[<p>Thanks&#8230;.it works&#8230;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
