How to create a .bin file? [Solved/Closed]

Posts
1
Registration date
Monday April 14, 2014
Status
Member
Last seen
April 14, 2014
- - Latest reply: David Webb
Posts
92
Registration date
Monday November 25, 2019
Status
Administrator
Last seen
December 6, 2019
- Nov 26, 2019 at 09:10 AM
I need to create a new .bin file by combining a mp3 file and a cdg file for playing on my daughter's karaoke machine. Any suggestions?
See more 

3 replies

Best answer
Posts
92
Registration date
Monday November 25, 2019
Status
Administrator
Last seen
December 6, 2019
57
2
Thank you
Hello, here is a helpful article on how to read and create a Bin file: https://ccm.net/faq/264-how-to-read-and-create-a-bin-and-cue-file

Regards,
David

David Webb

Content Editor and Community Manager - CCM.net

Respond to David Webb
Posts
1
Registration date
Thursday April 10, 2014
Status
Member
Last seen
April 14, 2014
1
1
Thank you
You can create a bin file with the help of the following instructions:

1.Add the namespace to the code page of your project. Writing and reading files requires the \"IO\" namespace. A namespace is a library of classes used by a developer. Writing to files requires the classes contained in the IO namespace. Add the following line to the beginning of your code file:

include System.IO;

2.Create the filestream variable and assign it to a binary stream. At this point, the file is created, but it is a blank binary file. Binary files can be created with any extension, but the standard is \".bin.\" Below is the code that creates the binary file:

FileStream file = new FileStream(\"C:\\\\mybinaryfile.bin\", FileMode.Create)
GO
BinaryWriter binarystream = new BinaryWriter(file);

3.Write to the binary file using the \"Write\" function. The Write function automatically encodes the values into binary mode, so there is no need to encode the information prior to saving it to the file. Below is an example of writing to a binary file:

binarystream.Write(\"My First Binary File\")
GO
binarystream.Write(10);

4.Close the file once all the information has been saved to the file. Closing the file is important in programming, because the process releases the file and unlocks it for use by users or other applications. The following line closes the binary file and saves it to the hard drive:

binarystream.Close();
0
Thank you
Can You elaborate this? Because i can't Clear this. can u Show the demo code for this one. Then can convert c#(BAL/DAL) as Bin File in asp.net.

Thanks.