CSMongo.IO.DynamicStream.InsertAt C# (CSharp) Метод

InsertAt() публичный Метод

Inserts a new byte at the specified index
public InsertAt ( int index, byte bytes ) : void
index int
bytes byte
Результат void
        public void InsertAt(int index, byte[] bytes)
        {
            this._Reset();
            this._Output.InsertRange(index, bytes);
        }

Usage Example

Пример #1
0
 /// <summary>
 /// Writes a the bytes for a CS string in BSON format
 /// </summary>
 public static byte[] AsCString(string value)
 {
     var stream = new DynamicStream();
     stream.Append(AsString(value));
     stream.InsertAt(0, BitConverter.GetBytes(stream.Length));
     return stream.ToArray();
 }
All Usage Examples Of CSMongo.IO.DynamicStream::InsertAt