You not only can override method, but also hide it. Basically, if method is not overriding the derived method, it is hiding it. A hiding method has to be declared using the new keyword.
Often in our application development we need to acquire and release some resources. That unmanaged resources could be files that we want to use from time to time, database connections, fonts etc. The important thing is to release resources once we have done with it. Since the CLR uses Garbage Collection to manage lifecycle of objects […]
The difference between abstract class and interface can be described in following table: Interface Abstract class Interface support multiple inheritance Abstract class does not support multiple inheritance Interface doesn’t Contains Data Member Abstract class contains Data Member Interface doesn’t contains Constructors Abstract class contains Constructors An interface Contains only incomplete member (Events, properties, methods, indexers) […]
You do not need to create Custom View Engine for most projects. The reason for using Custom View Engine is to change the default views location at run-time. The MVC Framework has two built-in view engines – Razor and WebForms. View engines implement IViewEngine interface:
Inheritance, together with encapsulation and polymorphism, is one of the three primary characteristics (or pillars) of object-oriented programming. Inheritance enables you to create new classes that reuse, extend, and modify the behavior that is defined in other classes. The class whose members are inherited is called the base class, and the class that inherits those […]
In order to refresh and consolidate main paradigms of OOP let’s talk about encapsulation first: Encapsulation, in object oriented programming methodology, prevents access to implementation details. It enables a group of properties, methods and other members to be considered a single unit or object.
Nullable types are instances of the System.Nullable struct. They are value types, though we can assign null to them. For example int? is a Nullable<Int32>. All nullable types have two values: The value of the data type. A boolean value that tells if value has been set(HasValue property). DateTime also is value type, btw
Fundamental differences between struct and class. Class Class is a reference type and its object is created on the heap memory. Class can inherit the another class. Class can have the all types of constructor and destructor. The member variable of class can be initialized directly. Class object can not be created without using the new […]