Bitmaps (not just *.BMP) are opened with
System.Drawing.Bitmap
constructor:
http://msdn.microsoft.com/en-us/library/0cbhe98f%28v=vs.110%29.aspx[
^].
"Or a binary file data"? There is no such thing. Everything, any file, is binary. You can open any file. What to do next? it depends. Please see:
http://msdn.microsoft.com/en-us/library/system.io.binaryreader.aspx[
^].
"How do I open a file easily in C#?" Wrong goal. You want to do things properly. The desire to do everything "the easiest way" does not make like easier, this is the shortest path to frustrations and dead ends. Do things properly. Learn hard. The ease is always a result of mastership; there is no other way around.
[EDIT]
Member 2113297 wrote:
I need to read out the sequence of bytes in the file, and send them out a port… that is my objective.
You just did the read part, as it is shown in your comment. It works only for not too big files, as you read it all at once and need to keep it all in memory. For bigger files — see above.
For sending to the port, please use
System.IO.Ports.SerialPort
:
http://msdn.microsoft.com/en-us/library/system.io.ports.serialport%28v=vs.110%29.aspx[
^].
Usually, serial port communications are done in a separate thread.
—SA