mike Delvotti

mike Delvotti

  • NA
  • 262
  • 0

Deserialize text file into datagrid

Jul 11 2014 8:43 AM

Guys, is it possible to Deserialize a binary text file and read it into a datagridview?

My below code does a rough job of trying to display it onto a message box but doesn't format it correctly

Ideally it would be nice to read the contents into a datagridview, is that possible?

            FileStream readStream;
            string msg = null;
            try
            {
               
                readStream = new FileStream("c:\\DB.dat", FileMode.Open);
                BinaryReader readBinary = new BinaryReader(readStream);
                msg = readBinary.ReadString();
                MessageBox.Show(msg);
                readStream.Close();
            }


Answers (10)