CryptoStream.WriteByte(Byte) 方法

定义

将一个字节写入流内的当前位置,并将流内的位置向前提升一个字节。Writes a byte to the current position in the stream and advances the position within the stream by one byte.

public:
 override void WriteByte(System::Byte value);
public override void WriteByte (byte value);
override this.WriteByte : byte -> unit
Public Overrides Sub WriteByte (value As Byte)

参数

value
Byte

要写入流中的字节。The byte to write to the stream.

异常

出现 I/O 错误。An I/O error occurs.

该流不支持写入,或者该流已关闭。The stream does not support writing, or the stream is already closed.

在流关闭后调用方法。Methods were called after the stream was closed.

注解

使用 CanWrite 属性可确定当前实例是否支持写入。Use the CanWrite property to determine whether the current instance supports writing.

适用于