Upraviť

Zdieľať cez


WindowsRuntimeStreamExtensions.AsRandomAccessStream(Stream) Method

Definition

Important

This API is not CLS-compliant.

Converts the specified stream to a random access stream.

public:
[System::Runtime::CompilerServices::Extension]
 static Windows::Storage::Streams::IRandomAccessStream ^ AsRandomAccessStream(System::IO::Stream ^ stream);
[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IRandomAccessStream AsRandomAccessStream (this System.IO.Stream stream);
[<System.CLSCompliant(false)>]
static member AsRandomAccessStream : System.IO.Stream -> Windows.Storage.Streams.IRandomAccessStream
<Extension()>
Public Function AsRandomAccessStream (stream As Stream) As IRandomAccessStream

Parameters

stream
Stream

The stream to convert.

Returns

A Windows Runtime IRandomAccessStream, which represents the converted stream.

Attributes

Remarks

Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Stream. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Applies to