一款简单易用的基础网络通讯组件库。

WriterExtensionWriteEnumTWriter 方法

将枚举值写入字节写入器。

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
C#
public static void WriteEnum<TWriter>(
	ref TWriter writer,
	Enum value
)
where TWriter : IBytesWriter

参数

writer  TWriter
字节写入器实例。
value  Enum
要写入的枚举值。

类型参数

TWriter
实现IBytesWriter接口的写入器类型。

备注

支持的底层类型包括:ByteSByteInt16UInt16Int32UInt32Int64UInt64

异常

NotSupportedException当枚举的底层类型不受支持时抛出。

参见