ChannelWriter<T>.TryWrite(T) 方法

定义

尝试将指定的项写入到通道。

public:
 abstract bool TryWrite(T item);
public abstract bool TryWrite (T item);
abstract member TryWrite : 'T -> bool
Public MustOverride Function TryWrite (item As T) As Boolean

参数

item
T

要写入的项。

返回

如果已写入该项,则为 true;否则为 false

适用于