Code:
using System;
using System.IO;
public sealed class Program
{
public static void Main()
{
using (Stream s = new FileStream(@"c:\sri\srip.txt", FileMode.Open))
{
int read;
while ((read = s.ReadByte()) != -1)
{
Console.Write("{0} ", read);
}
Console.ReadLine();
}
}
}
Output:
71 79 79 68 77 79 82 78 73 78 71
More C# Programs: