error serialising struct

  • Thread starter Thread starter Dirk Reske
  • Start date Start date
D

Dirk Reske

Hello,

I have following struct

struct Chunk
{
string Command;
byte[] Data;
}

when I try to serialize it after I filled it, all hangs up

byte[] bt = new byte[1024];
int len = reader.Read(bt,0,bt.Length);

Chunk data = new Chunk();
data.Command = "Data";
data.Data = bt;

ser.Serialize(strXml,data); //Here it hangs


when I let the byte array empty, all works fine
what is it?
 
Dirk said:
Hello,

I have following struct

struct Chunk
{
string Command;
byte[] Data;
}

when I try to serialize it after I filled it, all hangs up

byte[] bt = new byte[1024];
int len = reader.Read(bt,0,bt.Length);

Chunk data = new Chunk();
data.Command = "Data";
data.Data = bt;

ser.Serialize(strXml,data); //Here it hangs


when I let the byte array empty, all works fine
what is it?

WHat's 'ser' ? binary formatter, soap formatter?

Frans.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top