namespace IFactory
{
class Test
{
static int Main(string[] args)
{
if (args.Length != 3)
{
Console.WriteLine("usage: Test <filename> <field name> <record number>");
return 1;
}
//Open the stream and append to stringbuilder
StringBuilder buf = new StringBuilder();
using (FileStream fs = File.OpenRead(args[0]))
{
byte[] b = new byte[1024];
UTF8Encoding temp = new UTF8Encoding(true);
while (fs.Read(b, 0, b.Length) > 0)
{
buf.Append(temp.GetString(b));
}
}