WindowsRuntimeBufferExtensions.AsBuffer Method

Include Protected Members
Include Inherited Members

For apps that target Windows Phone OS 7.0 and 7.1, do not use any members of this type in your app. If you do, your code will throw a MethodAccessException. This type is security-critical, which restricts it to internal use by the .NET Framework for Windows Phone class library.

[SECURITY CRITICAL]

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns a buffer Windows.Storage.Streams.IBuffer interface that represents a range of bytes in a specified byte array. The array serves as a backing store for the IBuffer.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
AsBuffer(array<Byte>[]()[]) Returns a Windows.Storage.Streams.IBuffer interface that represents the specified byte array.
AsBuffer(array<Byte>[]()[], Int32, Int32) Returns a Windows.Storage.Streams.IBuffer interface that represents a range of bytes in the specified byte array.
AsBuffer(array<Byte>[]()[], Int32, Int32, Int32) Returns a Windows.Storage.Streams.IBuffer interface that represents a range of bytes in the specified byte array. Optionally sets the Length property of the IBuffer to a value that is less than the capacity.

Top

See Also

Reference

WindowsRuntimeBufferExtensions Class

WindowsRuntimeBufferExtensions Members

System.Runtime.InteropServices.WindowsRuntime Namespace