Export (0) Print
Expand All

WindowsRuntimeBufferExtensions::GetByte Method

.NET Framework 4.5

Returns the byte at the specified offset in the specified Windows.Storage.Streams.IBuffer interface.

This API is not CLS-compliant. 

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

static unsigned char GetByte(
	IBuffer^ source, 
	unsigned int byteOffset


Type: IBuffer

The buffer to get the byte from.

Type: System::UInt32

The offset of the byte.

Return Value

Type: System::Byte
The byte at the specified offset.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IBuffer. 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).


source is nullptr.


byteOffset is less than 0 (zero).


byteOffset is greater than or equal to the capacity of source.

.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.

© 2014 Microsoft