代码
        
public
 
void
 test()
        {
            

int
 myInt 
=
 
1
;
            

byte
[] bytes 
=
 
new
 
byte
[
1024
];
            BinaryWriter writer 

=
 
new
 BinaryWriter(
new
 MemoryStream(bytes));
            writer.Write(myInt);
            writer.Write(


j

);
            writer.Close();
        }