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

Write() public method

public Write ( double value ) : void
value double
return void
        public virtual void Write(double value)
        {
            if (BitConverter.IsLittleEndian) {
                WriteReverse(BitConverter.GetBytes(value));
            } else {
                WriteForward(BitConverter.GetBytes(value));
            }
        }

Same methods

BigEndianWriter::Write ( System.Guid uuid_head ) : void
BigEndianWriter::Write ( bool value ) : void
BigEndianWriter::Write ( byte value ) : void
BigEndianWriter::Write ( byte buffer, int index, int count ) : void
BigEndianWriter::Write ( char ch ) : void
BigEndianWriter::Write ( char chars, int index, int count ) : void
BigEndianWriter::Write ( decimal value ) : void
BigEndianWriter::Write ( float value ) : void
BigEndianWriter::Write ( int value ) : void
BigEndianWriter::Write ( long value ) : void
BigEndianWriter::Write ( sbyte value ) : void
BigEndianWriter::Write ( short value ) : void
BigEndianWriter::Write ( string value ) : void
BigEndianWriter::Write ( uint value ) : void
BigEndianWriter::Write ( ulong value ) : void
BigEndianWriter::Write ( ushort value ) : void

Usage Example

示例#1
0
        /// <summary>
        /// Create a blank 'trex' for the given track id.
        /// </summary>
        /// <param name="TrackId"></param>
        public trex(int TrackId)
            : base(0, 0, "trex")
        {
            _data = new System.IO.MemoryStream();
            BigEndianWriter ous = new BigEndianWriter(_data);

            ous.Write((UInt32)TrackId);	// Track
            ous.Write((UInt32)0);		// Default sample description index
            ous.Write((UInt32)0);		// Default sample duration
            ous.Write((UInt32)0);		// Default sample size
            ous.Write((UInt32)0);		// Default sample flags
        }
All Usage Examples Of System.IO.BigEndianWriter::Write