GSF.IO.BinaryStreamBase.Write C# (CSharp) Method

Write() public method

Writes the specifed value to the underlying stream in little-endian format.
public Write ( System.DateTime value ) : void
value System.DateTime the value to write
return void
        public void Write(DateTime value)
        {
            Write(value.Ticks);
        }
        /// <summary>

Same methods

BinaryStreamBase::Write ( System.Guid value ) : void
BinaryStreamBase::Write ( bool value ) : void
BinaryStreamBase::Write ( byte value ) : void
BinaryStreamBase::Write ( byte buffer, int length ) : void
BinaryStreamBase::Write ( byte buffer, int offset, int count ) : void
BinaryStreamBase::Write ( decimal value ) : void
BinaryStreamBase::Write ( double value ) : void
BinaryStreamBase::Write ( float value ) : void
BinaryStreamBase::Write ( int value ) : void
BinaryStreamBase::Write ( long value ) : void
BinaryStreamBase::Write ( sbyte value ) : void
BinaryStreamBase::Write ( short value ) : void
BinaryStreamBase::Write ( string value ) : void
BinaryStreamBase::Write ( uint value ) : void
BinaryStreamBase::Write ( ulong value ) : void
BinaryStreamBase::Write ( ushort value ) : void

Usage Example

 public void Save(BinaryStreamBase stream)
 {
     stream.Write((byte)1);
     stream.Write(DatabaseName);
     stream.Write(KeyTypeID);
     stream.Write(ValueTypeID);
     stream.Write(SupportedStreamingModes.Count);
     foreach (var encoding in SupportedStreamingModes)
     {
         encoding.Save(stream);
     }
 }
All Usage Examples Of GSF.IO.BinaryStreamBase::Write