I have been trying different theories and still am unsuccessful. I do however have a more specific question.
Is it possible to convert a Base64String to a number (int/long) i have tried using ToInt64 with no success. here is my current code.
Code:
class Program
{
static void Main(string[] args)
{
FileStream fs1;
byte[] b1;
string file1 = @"C:\temp\1.txt";
string b64string;
try
{
fs1 = new System.IO.FileStream(file1, System.IO.FileMode.Open, System.IO.FileAccess.Read);
b1 = new Byte[fs1.Length];
long bytesRead = fs1.Read(b1, 0, (int)fs1.Length);
fs1.Close();
b64string = System.Convert.ToBase64String(b1,0,b1.Length);
long l1 = System.Convert.ToInt64(b64string);
Console.WriteLine(b64string);
}
catch (System.Exception exp)
{
System.Console.WriteLine("{0}", exp.Message);
return;
}
}
}
If not is there a different way to convert the file to a number with no data loss when converting the number back to a file.