Skip to main content
Buffer class

Applies to Windows and Windows Phone

Provides a default implementation of the IBuffer interface and its related interfaces.

Syntax


var buffer = new Windows.Storage.Streams.Buffer();

public sealed class Buffer : IBuffer

Public NotInheritable Class Buffer
    Implements IBuffer

public ref class Buffer sealed : IBuffer

Attributes

[ MarshalingBehavior(Agile)]
[ Muse()]
[ Threading(Both)]
[ Version(0x06020000)]

Members

The Buffer class has these types of members:

Constructors

The Buffer class has these constructors.

ConstructorDescription
Buffer Initializes a new instance of the Buffer class with the specified capacity.

 

Methods

The Buffer class inherits methods from the Object class (C#/VB/C++).

Properties

The Buffer class has these properties.

PropertyAccess typeDescription

Capacity

Read-onlyGets the maximum number of bytes that the buffer can hold.

Length

Read/writeGets the number of bytes currently in use in the buffer.

 

Remarks

For more info, see Quickstart: Reading and writing a file, which shows how to read and write bytes to a file by using a Buffer.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.Storage.Streams
Windows::Storage::Streams [C++]

Metadata

Windows.winmd

See also

Quickstart: Reading and writing a file
Object
IBuffer