ReadOnlySpanAction<T,TArg> 委托

定义

封装一个方法,该方法接收 T 类型对象的只读范围和 TArg 类型的状态对象。Encapsulates a method that receives a read-only span of objects of type T and a state object of type TArg.

generic <typename T, typename TArg>
public delegate void ReadOnlySpanAction(ReadOnlySpan<T> span, TArg arg);
public delegate void ReadOnlySpanAction<T,in TArg>(ReadOnlySpan<T> span, TArg arg);
type ReadOnlySpanAction<'T, 'Arg> = delegate of ReadOnlySpan<'T> * 'Arg -> unit
Public Delegate Sub ReadOnlySpanAction(Of T, In TArg)(span As ReadOnlySpan(Of T), arg As TArg)

类型参数

T

只读范围内的对象的类型。The type of the objects in the read-only span.

TArg

表示状态的对象的类型。The type of the object that represents the state.

这是逆变类型参数。 即,可以使用指定的类型,也可以使用派生程度较低的任何类型。 有关协变和逆变的详细信息,请参阅泛型中的协变和逆变

参数

span
ReadOnlySpan<T>

T 类型对象的只读范围。A read-only span of objects of type T.

arg
TArg

TArg 类型的状态对象。A state object of type TArg.

继承
ReadOnlySpanAction<T,TArg>

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于