.net - Reflection: How to get the underlying type of a by-ref type -


I was surprised to know that the "referee" and "out" parameters are not marked by a special feature, even then ParameterInfo. IsOut, ParameterInfo.IsIn (both of which are always false as always I can see), parameter attributes.In and ParameterAttributes.Out instead, the "Ref" parameter is actually represented by a particular type of "Type" object And the "out" parameter is only an extra special There are referral parameters with ta (which I do not know yet, what kind of feature is).

Anyway, to create a sub-ref logic, you say Type.MakeByRefType (), but my question is that if you already have a referee type, then you return to the original type How come?

Hint: It is not built in the system type:

  type = int (int); Console.WriteLine (t.MakeByRefType () UnderlyingSystemType == T.); // FALSE  

Call.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -