Editar

Compartilhar via


StreamExtensions.Read<T>(Stream) Method

Definition

Reads a value of a specified type from a source Stream instance.

public static T Read<T> (this System.IO.Stream stream) where T : struct;
static member Read : System.IO.Stream -> 'T (requires 'T : struct)
<Extension()>
Public Function Read(Of T As Structure) (stream As Stream) As T

Type Parameters

T

The type of value to read.

Parameters

stream
Stream

The source Stream instance to read from.

Returns

T

The T value read from stream.

Exceptions

Thrown if stream reaches the end.

Applies to