TypedReference 结构
定义
重要
此 API 不符合 CLS。
描述既包含指向某位置的托管指针,也包含该位置可能存储的类型的运行时表示形式的对象。Describes objects that contain both a managed pointer to a location and a runtime representation of the type that may be stored at that location.
public value class TypedReference
[System.CLSCompliant(false)]
public struct TypedReference
[System.CLSCompliant(false)]
[System.Runtime.InteropServices.ComVisible(true)]
public struct TypedReference
[<System.CLSCompliant(false)>]
type TypedReference = struct
[<System.CLSCompliant(false)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type TypedReference = struct
Public Structure TypedReference
- 继承
- 属性
注解
类型化的引用是用于 varargs 和其他支持的类型/值组合。A typed reference is a type/value combination used for varargs and other support. TypedReference 是可用于参数和局部变量的内置值类型。TypedReference is a built-in value type that can be used for parameters and local variables.
TypedReference无法创建对象的数组。Arrays of TypedReference objects cannot be created. 例如,以下调用无效:For example, the following call is invalid:
Assembly::Load("mscorlib.dll")->GetType("System.TypedReference[]");
Assembly.Load("mscorlib.dll").GetType("System.TypedReference[]");
Assembly.Load("mscorlib.dll").GetType("System.TypedReference[]")
方法
| Equals(Object) |
检查该对象是否等于指定对象。Checks if this object is equal to the specified object. |
| GetHashCode() |
返回此对象的哈希代码。Returns the hash code of this object. |
| GetTargetType(TypedReference) |
返回指定 |
| MakeTypedReference(Object, FieldInfo[]) |
为由指定对象和字段说明列表标识的字段生成 |
| SetTypedReference(TypedReference, Object) |
将指定值转换为 |
| TargetTypeToken(TypedReference) |
返回指定 |
| ToObject(TypedReference) |
将指定 |