Last active
June 23, 2019 15:18
-
-
Save nedgrady/ea5558f4d788bdbc1f2abc8b72ccf096 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass { } | |
// Compiles into... | |
// Constructor declaration, remember a construcor is just a method under the hood. | |
MyClass..ctor: | |
// Push argument 0 onto the stack. Any CIL instance methods have an Argument 0 | |
// which is a pointer to the current object the method being is called upon, 'this', in C# | |
IL_0000: ldarg.0 | |
// Call our base class constructor on this. | |
IL_0001: call System.Object..ctor | |
IL_0006: nop | |
// Return from our method. | |
IL_0007: ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment