i'm having a code in which a String is consists of Binary Code i want to read it from Right to left. Can Someone Suggest me Better Way to Read the Binary String .
string myString;
using (FileStream fs = new FileStream("C:\\tvin.exe", FileMode.Open))
using (BinaryReader br = new BinaryReader(fs))
{
byte[] bin = br.ReadBytes(Convert.ToInt32(fs.Length));
myString = Convert.ToBase64String(bin);
}
byte[] rebin = Convert.FromBase64String(myString);
using (FileStream fs2 = new FileStream("C:\\tvout.exe", FileMode.Create))
using (BinaryWriter bw = new BinaryWriter(fs2))
bw.Write(rebin);
The thing is we can read a String from Left to string but i want to read in Right to Left, IF u Reverse the String then the Order of the Binary bits is changing .So please Suggest me Some Solution.