Edit

Share via


EnumerationOptions.BufferSize Property

Definition

Gets or sets the suggested buffer size, in bytes.

public:
 property int BufferSize { int get(); void set(int value); };
public int BufferSize { get; set; }
member this.BufferSize : int with get, set
Public Property BufferSize As Integer

Property Value

The buffer size. The default is 0 (no suggestion).

Remarks

Not all platforms use user allocated buffers, and some require either fixed buffers or a buffer that has enough space to return a full result. One scenario where this option is useful is with remote share enumeration on Windows. Having a large buffer may result in better performance as more results can be batched over the wire (for example, over a network share). A "large" buffer, for example, would be 16K. Typical is 4K.

The suggested buffer size will not be used if it has no meaning for the native APIs on the current platform or if it would be too small for getting at least a single result.

Applies to