Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WindowsRuntimeBufferExtensions Class

.NET Framework 4.5

Provides extension methods for operating on Windows Runtime buffers (Windows.Storage.Streams.IBuffer interface).

System.Object
  System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeBufferExtensions

Namespace:  System.Runtime.InteropServices.WindowsRuntime
Assembly:  System.Runtime.WindowsRuntime (in System.Runtime.WindowsRuntime.dll)

public static class WindowsRuntimeBufferExtensions

The WindowsRuntimeBufferExtensions type exposes the following members.

  NameDescription
Public methodStatic memberSupported in .NET for Windows Store appsAsBuffer(Byte[])Returns a Windows.Storage.Streams.IBuffer interface that represents the specified byte array.
Public methodStatic memberSupported in .NET for Windows Store appsAsBuffer(Byte[], Int32, Int32)Returns a Windows.Storage.Streams.IBuffer interface that represents a range of bytes in the specified byte array.
Public methodStatic memberSupported in .NET for Windows Store appsAsBuffer(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.
Public methodStatic memberSupported in .NET for Windows Store appsAsStreamReturns a stream that represents the same memory that the specified Windows.Storage.Streams.IBuffer interface represents.
Public methodStatic memberSupported in .NET for Windows Store appsCopyTo(IBuffer, Byte[])Copies all bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination array, starting at offset 0 (zero) in both.
Public methodStatic memberSupported in .NET for Windows Store appsCopyTo(IBuffer, IBuffer)Copies all bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination buffer, starting at offset 0 (zero) in both.
Public methodStatic memberSupported in .NET for Windows Store appsCopyTo(Byte[], IBuffer)Copies all bytes from the source array to the destination buffer (Windows.Storage.Streams.IBuffer), starting at offset 0 (zero) in both. The method does not update the length of the destination buffer.
Public methodStatic memberSupported in .NET for Windows Store appsCopyTo(IBuffer, UInt32, Byte[], Int32, Int32)Copies bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination array, specifying the starting index in the source buffer, the starting index in the destination array, and the number of bytes to copy.
Public methodStatic memberSupported in .NET for Windows Store appsCopyTo(IBuffer, UInt32, IBuffer, UInt32, UInt32)Copies bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination buffer, specifying the starting index in the source, the starting index in the destination, and the number of bytes to copy.
Public methodStatic memberSupported in .NET for Windows Store appsCopyTo(Byte[], Int32, IBuffer, UInt32, Int32)Copies bytes from the source array to the destination buffer (Windows.Storage.Streams.IBuffer), specifying the starting index in the source array, the starting index in the destination buffer, and the number of bytes to copy. The method does not update the Length property of the destination buffer.
Public methodStatic memberSupported in .NET for Windows Store appsGetByteReturns the byte at the specified offset in the specified Windows.Storage.Streams.IBuffer interface.
Public methodStatic memberSupported in .NET for Windows Store appsGetWindowsRuntimeBuffer(MemoryStream)Returns a Windows.Storage.Streams.IBuffer interface that represents the same memory as the specified memory stream.
Public methodStatic memberSupported in .NET for Windows Store appsGetWindowsRuntimeBuffer(MemoryStream, Int32, Int32)Returns a Windows.Storage.Streams.IBuffer interface that represents a region within the memory that the specified memory stream represents.
Public methodStatic memberSupported in .NET for Windows Store appsIsSameDataReturns a value that indicates whether two buffers (Windows.Storage.Streams.IBuffer objects) represent the same underlying memory region.
Public methodStatic memberSupported in .NET for Windows Store appsToArray(IBuffer)Returns a new array that is created from the contents of the specified buffer (Windows.Storage.Streams.IBuffer). The size of the array is the value of the Length property of the IBuffer.
Public methodStatic memberSupported in .NET for Windows Store appsToArray(IBuffer, UInt32, Int32)Returns a new array that is created from the contents of the specified buffer (Windows.Storage.Streams.IBuffer), starting at a specified offset and including a specified number of bytes.
Top

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Store apps

Supported in: Windows 8

Supported in: Windows Phone Silverlight 8

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft