共用方式為


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

適用於