binarywriter Questions

2

Solved

I have a potentially larger int array that I'm writing to a file using BinaryWriter. Of course, I can use the default approach. using (BinaryWriter writer = new BinaryWriter(File.Open(path, FileMo...
Scanlan asked 7/5, 2019 at 19:46

4

Solved

I'm working on a bit-based B/W/Greyscale Pre-Compiled font format, and was having issues with either reading or writing the format, (I've not been able to determine where the issue was. (I do have ...
Forswear asked 13/8, 2011 at 16:55

2

Solved

I Have A String Of Binary Number Like temp = "0101110011" And I Want To Save That As File this Temp Have 10 char And How Can I Save This string To file With 10 Bit Length ? void Save_Data(string t...
Monumentalize asked 21/1, 2017 at 10:10

2

Solved

I'm new to object serialization, and in the course of my learning how to read from and write to a file (deserialize and serialize) using BinaryFormatter, I came across BinaryReader and BinaryWriter...

3

Solved

I am using BinaryWriter in my code, here is my code: static void Main(string[] args) { FileInfo file = new FileInfo(@"F:\testfile"); if (file.Exists) file.Delete(); using (BinaryWriter bw = new...
Vachel asked 10/3, 2016 at 7:11

3

I have a list of float to write to a file. The code below does the thing but it is synchronous. List<float> samples = GetSamples(); using (FileStream stream = File.OpenWrite("somefile.bin")...
Craal asked 15/2, 2016 at 16:49

1

Solved

Size of each character in ASCII (StreamWriter) takes 1 byte whether its a number or character. Similarly what will be the size of each character, integer in binary? (BinaryWriter). Can some one e...
Eleusis asked 18/12, 2015 at 7:21

1

I'm writing raw byte values to a file: When values are <= 127, everything is ok. But if a byte is > 127, it gets all messsed up. I've already tried changing encoding format and such, w...
Stevenson asked 25/11, 2015 at 13:34

1

Solved

I find it difficult to express myself so I'll jump right into the code FileStream stream = new FileStream("//ignoreThis//demo.bin", FileMode.Append, FileAccess.Write, FileShare.Write)); BinaryWr...
Suffering asked 31/10, 2015 at 18:8

2

Solved

The .NET BinaryReader/BinaryWriter classes can be constructed with specifying an Encoding to use for String-related operations. I was implementing custom string formats with extension methods, but...
Joses asked 3/4, 2015 at 16:15

3

Solved

How to serialize a rather complex structure into a byte[] array, using BinaryWriter? Update: For this to work, every structure (and sub-structure?) must be decorated with the [Serializable...
Bertberta asked 16/9, 2011 at 8:43

9

Solved

I'm debugging some issues with writing pieces of an object to a file and I've gotten down to the base case of just opening the file and writing "TEST" in it. I'm doing this by something like: stat...
Jayme asked 28/9, 2009 at 18:4

4

Solved

I have one method that receives a Stream to write on it using a BinaryWriter. But when I dispose this BinaryWriter it also closes the stream. Can I leave it undisposed so I can leave my stream open...
Uncalledfor asked 5/7, 2009 at 20:55

3

Solved

I want to use a generic WriteList(List value) function to write a List using the BinaryWriter. Here is the code I am using: public void WriteList<T>(List<T> value) { for (int i = 0; i...
Thoroughfare asked 20/7, 2011 at 22:20

1

Solved

My application is a small C# database, and I'm using BinaryWriter to save the database to a file which is working fine with the basic types such as bool, uint32 etc. Although I've got a variable th...
Master asked 20/7, 2011 at 9:18
1

© 2022 - 2024 — McMap. All rights reserved.