Domanda

What is the equivalent function of Type.MakeByRefType() in Mono.Cecil ?

For example:

Type xArgTypeDef;
xArgTypeDef = _method.DeclaringType;
xArgType.MakeByRefType()
È stato utile?

Soluzione

TypeReference type = _method.DeclaringType;
ByReferenceType byRef = new ByReferenceType(type);

Easy as pie.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top