Hi all

I have to read data from a binary file .And that data is at a particular address F7F0 and i have to store that data in a variable . As far as i know the binary file contains address. But can that address be printed or taken for any kind of manipulations?? Do we have any method to retrieve the data from any specific address. Can anyone help me ?

7 Years
Discussion Span
Last Post by mshauny

Its a bit confusing t hear you talking about Binary and memory addresses in the same context in a .NET / C# forum. But say you really had to, as the previous poster has stated you could use the FileStream class to do some basic workarounds with Binary data.

But I would advise you to use a more Binary specific reader and write as the BinaryReader and BinaryWriter classes. and if you are talking about the memory data domain, you will have to use the unsafe keywork in C# as in

unsafe{/*unsafe , low level code*/}

and further more set the unsafe flag on your project IDE options or pass /unsafe to csc if you're using the cmd-line UI.

and for printing or saving addresses you may wanna try pointers which are in the same context as unsafe code.
and you can print the address with &varName;(address) or *varName (hump in memory to get contents)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.