System.IO.Ports.SerialPortBase.GetBufferedData C# (CSharp) Method

GetBufferedData() protected method

Returns specified amount of data from internal circular read buffer. If there is not enough data available, remaining bytes are filled with zeros.
protected GetBufferedData ( int arraySize ) : byte[]
arraySize int The number of bytes to return.
return byte[]
        protected byte[] GetBufferedData(int arraySize)
        {
            byte[] data = new byte[arraySize];          // This method can be (and is) used to increase the internal buffer size,
            GetBufferedData(data, 0, arraySize);        // with the side effect of aligning the circular wrapped data linearly from the beginning.
            return data;
        }

Same methods

SerialPortBase::GetBufferedData ( byte buffer, int offset, int count ) : int