Hy keith,

Note 1: (out T) and (ref T) are the same type; They differ in that the
> first has the OutAttribute bit set. (I don't know if out can override
> ref or vice-versa. The standard doesn't seem to disallow either case.)


I believe 'out' and 'ref' are just for the high level languages such as C# &
VB.Net. The CLR doesn't use them in no way.
These attributes are translated into bits in the flags of the parameter. The
method signature doesn't contain any parameter flag in it.

Note 2: specialnames op_Implicit and op_Explicit use the return type
> as part of their signatures, too.
>

The return type is a part of the method signature. It's not just for the
case of the op_Implicit & op_Explicit methods.
However no high level language recognizes methods differencing just by their
return type (except for op_Implicit & op_Explicit where the compiler itself
converts implicit & explicit type conversions to explicit calls to these
methods, the programmer can in no way call these methods explicitly).

Serge Lidin said :
"... The common language runtime allows you to overload the methods on the
return type and even on the calling convention.
...
No high-level language (I know of), including C# and C++, supports method
overloading on return type or field overloading on type. ILAsm does, because
in ILAsm the return type of a method and the type of a field must be
explicitly specified when the method or the field is referenced...." (Expert
.Net 2.0 IL Assembler, page 219)

--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to