I am retrieving the byte contents from the database

I am creating a new file using

Byte[] bindata = (byte[])dr.GetValue(0);
FileStream fs1 = new FileStream("C:buffer.txt", FileMode.Create, FileAccess.ReadWrite);
BinaryWriter bw = new BinaryWriter(fs1);

Please tell me what to do next to store the binddata byte[] into buffer.txt

Recommended Answers

All 2 Replies

byte[] buffer = new byte[10];
      System.IO.File.WriteAllBytes("C:\file.txt", buffer);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.