Pergunta

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

For example:

Type xArgTypeDef;
xArgTypeDef = _method.DeclaringType;
xArgType.MakeByRefType()
Foi útil?

Solução

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

Easy as pie.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top