What is the difference between var and dynamic keywords? var is early binded dynamic is late binded . In order to understand the concept of early binding and late binding, let us check the below program- In the above program, we are using var keyword to assign string type of value to a variable. Since the variable is of type string, hence while trying to print the length of the string on console, we have to use Length property. When we try to do so, after typing a dot(.) after the variable "name", all the properties associated with the string variable are easily accessible along with the length property. Now, in all the above process where is early binding explained? Notice, the Length property of the string starts with capital "L" letter. If we try to use small "l" , then the compiler will immediately show the error red line indicating that there is no property "length" that starts with small "l" for a ...
What is the difference between abstract class and interface? Abstract Class- Abstract classes can have implementation for some of its members. Abstract classes can have fields as its members. Abstract class can inherit from another abstract class or interface. Multiple inheritance is not possible in case of abstract class. Interfaces- Interfaces cannot have implementation for any of its members. Interfaces cannot have fields as its members. Interface can only inherit from another interface and not a class. Multiple inheritance is possible in case of interfaces.