public Int32 GetBytesAvailable() { if (this._isDisposed) { throw new ObjectDisposedException("Rs232SerialPort"); } if (!this.IsOpen) { return 0; } return UnsafeNativeMethods.serialDataAvail(this._id); }