System.IO.BinaryWriter.Write C# (CSharp) Method

Write() public method

public Write ( char chars, int index, int count ) : void
chars char
index int
count int
return void
        public virtual void Write(char[] chars, int index, int count)
        {
            byte[] bytes = _encoding.GetBytes(chars, index, count);
            OutStream.Write(bytes, 0, bytes.Length);
        }

Same methods

BinaryWriter::Write ( bool value ) : void
BinaryWriter::Write ( byte value ) : void
BinaryWriter::Write ( byte buffer, int index, int count ) : void
BinaryWriter::Write ( char ch ) : void
BinaryWriter::Write ( decimal value ) : void
BinaryWriter::Write ( double value ) : void
BinaryWriter::Write ( float value ) : void
BinaryWriter::Write ( int value ) : void
BinaryWriter::Write ( long value ) : void
BinaryWriter::Write ( sbyte value ) : void
BinaryWriter::Write ( short value ) : void
BinaryWriter::Write ( string value ) : void
BinaryWriter::Write ( uint value ) : void
BinaryWriter::Write ( ulong value ) : void
BinaryWriter::Write ( ushort value ) : void

Usage Example

 // DSFチャンクの数字はリトルエンディアンバイトオーダー
 private void BwWriteLE4(BinaryWriter bw, uint v)
 {
     bw.Write((byte)(v & 0xff));
     bw.Write((byte)((v >> 8) & 0xff));
     bw.Write((byte)((v >> 16) & 0xff));
     bw.Write((byte)((v >> 24) & 0xff));
 }
All Usage Examples Of System.IO.BinaryWriter::Write