nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Runtime / Pointer

Pointer

Full name Microsoft.VisualBasic.Emit.Marshal.Pointer`1 Assembly Microsoft.VisualBasic.Runtime Members 31

Array index helper.

00 Remarks

(在数组的索引基础上封装了数组本身)

Type Parameters
NameDescription
T

01 Syntax

Microsoft.VisualBasic.Emit.Marshal.Pointer`1

02 Methods

NameOverloadsSummary
.ctor 2
MoveNext 1 Pointer move to next and then returns is Pointer.EndRead
PeekNext 1 获取得到下一个对象而不移动当前的内部指针
GetLeftsAll 1 获取当前指针位置后面的所有元素
op_Explicit 1 获取得到当前的元素
op_LeftShift 1 前移offset个单位,然后返回值,这个和Peek的作用一样,不会改变指针位置
op_RightShift 1 后移offset个单位,然后返回值,这个和Peek的作用一样,不会改变指针位置
op_Addition 1 Move steps and returns this pointer
op_Subtraction 1 move back current read position index
op_UnaryPlus 1 Pointer move to next and then returns the previous value
op_UnaryNegation 1 The stack trace back operator.
ToString 1
op_True 1
op_False 1
op_OnesComplement 1
op_Implicit 1
op_LessThanOrEqual 1
op_GreaterThanOrEqual 1
stackalloc 1
op_Equality 1
op_Inequality 1

03 Properties

NameOverloadsSummary
Current 1 Pointer.Position -> its current value
Length 1 Memory block size
UBound 1 返回指定维度的一个数组,最高可用的下标。
Value 1 相对于当前的指针的位置而言的
RawBuffer 1 Raw memory of this pointer
EndRead 1 Is read to end?
Position 1 Current read position
NullEnd 1

04 Fields

NameOverloadsSummary
buffer 1 the in-memory dataset

05 Members

method .ctor #
#ctor(`0())
Remarks

为了保持原来的对象引用,在这里就不进行ToArray数组复制来打破这种引用关系了

Parameters
NameTypeDescription
array`0()

-

method .ctor overload 2 #
#ctor(IEnumerable(Of `0))

Create a collection wrapper from a source buffer.

Remarks

construct an in-memory dataset

Parameters
NameTypeDescription
sourceIEnumerable(Of `0)

The collection source buffer

method MoveNext #
MoveNext

Pointer move to next and then returns is Pointer.EndRead

method PeekNext #
PeekNext

获取得到下一个对象而不移动当前的内部指针

method GetLeftsAll #
GetLeftsAll

获取当前指针位置后面的所有元素

method op_Explicit #
op_Explicit(Pointer(Of `0))

获取得到当前的元素

Parameters
NameTypeDescription
pPointer(Of `0)

-

method op_LeftShift #
op_LeftShift(Pointer(Of `0), Int32)

前移offset个单位,然后返回值,这个和Peek的作用一样,不会改变指针位置

Parameters
NameTypeDescription
pPointer(Of `0)

-

offsetInt32

-

method op_RightShift #
op_RightShift(Pointer(Of `0), Int32)

后移offset个单位,然后返回值,这个和Peek的作用一样,不会改变指针位置

Parameters
NameTypeDescription
pPointer(Of `0)

-

offsetInt32

-

method op_Addition #
op_Addition(Pointer(Of `0), Int32)

Move steps and returns this pointer

Parameters
NameTypeDescription
ptrPointer(Of `0)

-

dInt32

-

method op_Subtraction #
op_Subtraction(Pointer(Of `0), Int32)

move back current read position index

Parameters
NameTypeDescription
ptrPointer(Of `0)

-

dInt32

-

method op_UnaryPlus #
op_UnaryPlus(Pointer(Of `0))

Pointer move to next and then returns the previous value

Parameters
NameTypeDescription
ptrPointer(Of `0)

-

method op_UnaryNegation #
op_UnaryNegation(Pointer(Of `0))

The stack trace back operator. (指针的位置往回移动一个单位,然后返回原来的位置的元素的值)

Parameters
NameTypeDescription
ptrPointer(Of `0)

-

property Current #
Current

Pointer.Position -> its current value

Remarks

当前的位置是指相对于当前的位置offset为0的位置就是当前的位置

property Length #
Length

Memory block size

Returns

buffer.Length

property UBound #
UBound

返回指定维度的一个数组,最高可用的下标。

Returns

Int32。 指定维度的下标可以包含的最大值。 如果 Array 只有一个元素, UBound ,则返回 0。 如果 Array 不包含任何元素,例如,如果它是零长度字符串, UBound 返回-1。

property Value #
Value(Int32)

相对于当前的指针的位置而言的

Remarks

这个属性并不会移动当前的指针的位置

Parameters
NameTypeDescription
pInt32

相对于当前的位置的offset偏移量

property RawBuffer #
RawBuffer

Raw memory of this pointer

property EndRead #
EndRead

Is read to end?

property Position #
Position

Current read position

field buffer #
buffer

the in-memory dataset

property NullEnd #
NullEnd
method ToString #
ToString()
method op_True #
op_True(Pointer(Of T))
method op_False #
op_False(Pointer(Of T))
method op_OnesComplement #
op_OnesComplement(Pointer(Of T))
method op_Implicit #
op_Implicit(T())
method op_LessThanOrEqual #
op_LessThanOrEqual(Pointer(Of T), Pointer(Of T))
method op_GreaterThanOrEqual #
op_GreaterThanOrEqual(Pointer(Of T), Pointer(Of T))
method stackalloc #
stackalloc(Int32)
method op_Equality #
op_Equality(Pointer(Of T), Int32)
method op_Inequality #
op_Inequality(Pointer(Of T), Int32)