WindowsRuntimeStreamExtensions.AsRandomAccessStream(Stream) Method

Definition

Important

This API is not CLS-compliant.

Converts the specified stream to a random access stream.

[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IRandomAccessStream AsRandomAccessStream (this System.IO.Stream stream);

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

Product Versions
UWP 10.0