I'm exporting Hex values out to disk. Everytime I do it, it comes out backwards..
ulong [] FontData = new ulong[1];
private void writeData()
{
HexData[0]=0xCF1333373F43D7FF;
HexData[1]=0xCF1333373F43D7FF;
using (FileStream fs = new FileStream(@"c:\DATA.DAT",FileMode.Create,FileAccess.Write))
{
using (BinaryWriter bw = new BinaryWriter(fs))
{
foreach (ulong DataSegment in HexData)
{
bw.Write((ulong)DataSegment);
}
}
}
It dumps the data; but it comes out backwards (hexdump):
00000000h: FF D7 43 3F 37 33 13 CF FF D7 43 3F 37 33 13 CF ;
I've messed with the encoding on the binarywriter and nothing changes. Am I missing something?
Wolf
ulong [] FontData = new ulong[1];
private void writeData()
{
HexData[0]=0xCF1333373F43D7FF;
HexData[1]=0xCF1333373F43D7FF;
using (FileStream fs = new FileStream(@"c:\DATA.DAT",FileMode.Create,FileAccess.Write))
{
using (BinaryWriter bw = new BinaryWriter(fs))
{
foreach (ulong DataSegment in HexData)
{
bw.Write((ulong)DataSegment);
}
}
}
It dumps the data; but it comes out backwards (hexdump):
00000000h: FF D7 43 3F 37 33 13 CF FF D7 43 3F 37 33 13 CF ;
I've messed with the encoding on the binarywriter and nothing changes. Am I missing something?
Wolf