WindowsRuntimeStreamExtensions.AsRandomAccessStream(Stream) WindowsRuntimeStreamExtensions.AsRandomAccessStream(Stream) 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);
static member AsRandomAccessStream : System.IO.Stream -> Windows.Storage.Streams.IRandomAccessStream

Parameters

stream
Stream Stream Stream

The stream to convert.

Returns

A Windows Runtime IRandomAccessStream, which represents the converted stream.

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