CyrusBuilt.MonoPi.IO.Serial.Rs232SerialPort.Write C# (CSharp) 메소드

Write() 공개 메소드

Writes a single byte to the port.
/// This instance has been disposed and is no longer usable. /// /// The port is closed. ///
public Write ( Byte val ) : void
val Byte /// The byte to write. ///
리턴 void
		public void Write(Byte val) {
			if (this._isDisposed) {
				throw new ObjectDisposedException("Rs232SerialPort");
			}

			if (!this.IsOpen) {
				throw new InvalidOperationException("Cannot send char to a closed port.");
			}
			UnsafeNativeMethods.serialPutChar(this._id, val);
		}