Home > Net >  The output character buffer is too small
The output character buffer is too small

Time:02-27

 
FileStream stream=new FileStream (file, FileMode. Open, FileAccess. Read);
BinaryReader br=new BinaryReader (stream);
Char [] byt=new char [2];
Byt [0]=br. ReadChar ();
Byt [1]=br. ReadChar ();//read 1 byte, throw an exception: output character buffer is too small, unable to contain the decoding of characters!

//...
  •  Tags:  
  • C#
  • Related