ChannelWriter<T>.TryWrite(T) Method

Definition

Attempts to write the specified item to the channel.

C#
public abstract bool TryWrite(T item);

Parameters

item
T

The item to write.

Returns

true if the item was written; otherwise, false.

Applies to

Produto Versións
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided), 2.1 (package-provided)