Frage

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

For example:

Type xArgTypeDef;
xArgTypeDef = _method.DeclaringType;
xArgType.MakeByRefType()
War es hilfreich?

Lösung

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

Easy as pie.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top