Return to Snippet

Revision: 14032
at May 16, 2009 11:40 by stewshack


Initial Code
string DeathStarPlans = @"C:\DeathStarPlans.txt";

StringBuilder R2D2 = new StringBuilder();

using ( StreamReader PrincessLeia = new StreamReader( DeathStarPlans ) )
{
	while ( PrincessLeia.Peek() >= 0 )
	{
		R2D2.Append( PrincessLeia.ReadLine() );
	}
}

Initial URL

                                

Initial Description
This is how I read a file using C#.

Initial Title
C# Reading a File

Initial Tags
file, c

Initial Language
C#