Linked Questions
11 questions linked to/from How to read file binary in C#?
11 votes
2 answers
78k views
Convert any file into a binary file and vice versa
I've searched in StackOverFlow website and over the internet for this question and its relevant questions but I still haven't got a clear answer. I want to know what software may I use to convert any ...
2 votes
3 answers
6k views
Trying to Read Strings from a Binary File
Here is a simple program I made just trying to write a couple variables to a binary file, and then reading it back. I'm trying to figure out how to read a string from a binary file. It wrote it ...
1 vote
3 answers
3k views
Convert ReadProcessMemory output to string
I am using ReadProcessMemory in C# output is bytes[]. I want to covert this to string. How to do that? My code is below.. !ReadProcessMemory(appProcess.Handle, mbi.BaseAddress, buffer, mbi.RegionSize,...
-1 votes
1 answer
2k views
Why reading EXE as text is showing 'MZ' when printed
String inputFile = "C:\\Users\\Neil\\Desktop\\DCR\\file.exe"; Byte[] bytes = File.ReadAllBytes(inputFile); String content = Encoding.Default.GetString(bytes); Console.WriteLine(content); Output of ...
2 votes
2 answers
1k views
How to make a memory dump in .net?
How do you obtain a memory dump from a given memory address in the format: Address | Hexadecimal representation | ASCII representation --------------------------------------...
2 votes
2 answers
671 views
Converting bytes[] to literal string
I have a problem in my C# program. I am currently developing a gateway (both TCP and UDP protocols), and have to log the traffic to a file. I got some test data to try my gateway with. Example data: ...
0 votes
1 answer
2k views
display unprintable characters
I'm writing a tiny hex viewer for my own needs. Stuck in a situation where the standard Label control won't show up an unprintable characters in string: public string ToASCIIstring(int numColumns) { ...
-1 votes
1 answer
588 views
C# - convert any filetype to bitmap show in picturebox [closed]
I want a OpenFileDialog to select any file-types and show the file bits in a bitmap image. I mean the selected file contain some 0/1 bits, I want to show them in black and white image. Any Idea?
0 votes
1 answer
882 views
Iextract information from audio file C#
If I have an audio *WAV file or record and I want to extract this information from this audio by C# How I can do it? I want an easy way please Information I wanted to extract it Number of Samples ...
0 votes
1 answer
787 views
Null and Space char decoding in ASCII 8-bit encoded file
I have an ASCII-extended txt file and i need to convert it to a byte array. The problem is that the Null char and the space are decoded with the same 0x20 value. How I can discriminate between these ...
1 vote
0 answers
164 views
WBMP to PNG error in some pixels in the final png
I have a problem with my code. After read wbmp data, get width & height, I setPixel according to the data converted into the biarray. But my final png file contains a picture that looks like a ...