1// Writes a specified section of a byte buffer to output.2 public voidWrite(byte[] buffer,int offset,int count)3{4if(!IsOpen)5 throw new InvalidOperationException(SR.GetString(SR.Port_not_open));6if(buffer==null)7 throw new ArgumentNullException("buffer", SR.GetString(SR.ArgumentNull_Buffer));8if(offset <0)9 throw new ArgumentOutOfRangeException("offset", SR.GetString(SR.ArgumentOutOfRange_NeedNonNegNumRequired));10if(count <0)11 throw new ArgumentOutOfRangeException("count", SR.GetString(SR.ArgumentOutOfRange_NeedNonNegNumRequired));12if(buffer.Length - offset < count)13 throw new ArgumentException(SR.GetString(SR.Argument_InvalidOffLen));14if(buffer.Length ==0)return;1516 internalSerialStream.Write(buffer, offset, count, writeTimeout);17}18[Browsable(false)]19[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]20 public Stream BaseStream
21{22 get {23if(!IsOpen)24 throw new InvalidOperationException(SR.GetString(SR.BaseStream_Invalid_Not_Open));2526return internalSerialStream;27}28}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/07/09 01:13