点击或拖拽改变大小

HslExtensionWrite 方法

Writes a block of bytes to the current stream using data read from a buffer.

命名空间:  HslCommunication
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.1.1.0 (12.1.1.0)
语法
public static void Write(
	this MemoryStream ms,
	byte[] buffer
)

参数

ms
类型:System.IOMemoryStream

[缺少 "M:HslCommunication.HslExtension.Write(System.IO.MemoryStream,System.Byte[])" 的 <param name="ms"/> 文档]

buffer
类型:SystemByte
The buffer to write data from.

备注

在 Visual Basic 和 C# 中,这个方法可以当成为类型 MemoryStream 的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic)扩展方法 (C# 编程指南) 获取更多信息。
异常
异常条件
ArgumentNullExceptionbuffer is .
NotSupportedExceptionThe stream does not support writing. For additional information see CanWrite. -or- The current position is closer than count bytes to the end of the stream, and the capacity cannot be modified.
ArgumentExceptionoffset subtracted from the buffer length is less than count.
ArgumentOutOfRangeExceptionoffset or count are negative.
IOExceptionAn I/O error occurs.
ObjectDisposedExceptionThe current stream instance is closed.
参见