Read a file in C#

Read0.cs
===
using System;
using System.IO;
namespace ns{
class zzz
{
public static void Main()
{
FileStream f = new FileStream(“c:\\c\\pointers.cs”, FileMode.Open, FileAccess.Read);
byte [] a;
a = new byte[512];
int b = f.Read(a, 0, 512);
Console.WriteLine(b);
string s = System.Text.Encoding.ASCII.GetString(a, 0, b);
Console.Write(s);
}
}
}
==

Read.cs
===
using System.IO;
class read{
public static void Main()
{
File a=new File(“C:\\jimmy\\Comp\\Microsoft\\C#\\C#.txt”);
Stream sr=a.OpenRead();
int fp;
do{
fp=sr.ReadByte();
if(fp != -1)
System.Console.WriteLine(fp.ToString());
}
while( fp != -1);
sr.Close();
}
}
==

Related posts :

  • Tip of the day script
  • GIMME DAT FILE!
  • Anti leech script for sale
  • Read from Web using C#
  • MICRO EMAIL EXTRACTOR
  • SUPER SORTER
  • Change desktop wallpaper
  • Leave a Comment