Browse by Tags

All Tags » OOP (RSS)

Type Initialisers

Following my earlier post on instance constructors, I am going to cover the "Type Initialisers" this time. Unlike instance constructors, which are created by the compiler if none is defined by the developer, types do not necessarily get an initialiser. Type initialisers are mapped to the .cctor method (whereas instance constructors are mapped to .ctor). The following screenshot shows how the details of the ApplicationController class are displayed in Ildasm. public class ApplicationController { private static ApplicationController instance; }...
Posted by Mehran Nikoo | with no comments
Filed under: ,

Instance Constructors

It's construction time! Read this post if you want to refresh your mind on how object construction works. In this post, I will focus on instance constructors in C# and will leave the static constructors (aka type initialisers) to the next post. Every...
Posted by Mehran Nikoo | 1 comment(s)
Filed under: ,