■
Note
If you happen to have a background in COM development, do know that .NET objects do not maintain
an internal reference counter, and therefore managed objects do not expose methods such as
AddRef()
or
Release()
.
The CIL of new
When the C# compiler encounters the new keyword, it will emit a CIL newobj instruction into the
method implementation. If you were to compile the current example code and investigate the
resulting assembly using ildasm.exe, you would find the following CIL statements within the
MakeACar() method:
.method public hidebysig static void MakeACar() cil managed
{
Do'stlaringiz bilan baham: |