ValueBuffer ValueBuffer Struct

Definition

Represents a set of indexed values. Typically used to represent a row of data returned from a database.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public struct ValueBuffer
Public Structure ValueBuffer

Inherited Members

System.ValueType

System.ValueType.ToString()System.ValueType.ToString()

System.Object

System.Object.Equals(System.Object, System.Object)System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()System.Object.GetType()

Constructors

ValueBuffer(IList) ValueBuffer(IList(Of Object))

Initializes a new instance of the ValueBuffer class.

public ValueBuffer(IList<object> values)
Public Sub New(values As IList(Of Object))
Parameters
values
System.Collections.Generic.IList<System.Object> System.Collections.Generic.IList(Of System.Object)

The list of values for this buffer.

ValueBuffer(IList, Int32) ValueBuffer(IList(Of Object), Int32)

Initializes a new instance of the ValueBuffer class.

public ValueBuffer(IList<object> values, int offset)
Public Sub New(values As IList(Of Object), offset As Integer)
Parameters
values
System.Collections.Generic.IList<System.Object> System.Collections.Generic.IList(Of System.Object)

The list of values for this buffer.

offset
System.Int32 System.Int32

The starting slot in values for this buffer.

Fields

Empty Empty

A buffer with no values in it.

public static readonly ValueBuffer Empty
Public Shared ReadOnly Empty As ValueBuffer

Properties

Count Count

Gets the number of values in this buffer.

public int Count { get; }
Public ReadOnly Property Count As Integer
Value
System.Int32 System.Int32

IsEmpty IsEmpty

Gets a value indicating whether the value buffer is empty.

public bool IsEmpty { get; }
Public ReadOnly Property IsEmpty As Boolean
Value
System.Boolean System.Boolean

Item[Int32] Item(Int32)

Gets the value at a requested index.

public object this[int index] { get; set; }
Public Property Item(index As Integer) As Object
Parameters
index
System.Int32 System.Int32

The index of the value to get.

Value
System.Object System.Object

The value at the requested index.

Methods

Equals(Object) Equals(Object)

Determines if this value buffer is equivalent to a given object (i.e. if they are both value buffers and contain the same values).

public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
System.Object System.Object

The object to compare this value buffer to.

Returns
System.Boolean System.Boolean

True if the object is a ValueBuffer and contains the same values, otherwise false.

Overrides
System.ValueType.Equals(System.Object)System.ValueType.Equals(System.Object)

GetHashCode() GetHashCode()

Gets the hash code for the value buffer.

public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
Returns
System.Int32 System.Int32

The hash code for the value buffer.

Overrides
System.ValueType.GetHashCode()System.ValueType.GetHashCode()

WithOffset(Int32) WithOffset(Int32)

Creates a new buffer with data starting at the given index in the current buffer.

public ValueBuffer WithOffset(int offset)
Public Function WithOffset(offset As Integer) As ValueBuffer
Parameters
offset
System.Int32 System.Int32

The slot in the current buffer that will be the starting slot in the new buffer.

Returns

The newly created buffer.