Abstract Class are a type of class that does not have any implementation. A Abstract class is generally used as a base class. We cannot create any instance of an abstract class.
Structure is a value type but class is a reference type. Structures can store the value directory but classes hold the reference of the value you want to store.
Generics gives us the flexibility to change the value of return types at the run time. We can use <> brackets when declaring the objects. For Example: IList<T> lst =new List<T> where <T> is the return type.
Extension methods are used for extending the functionality of a currently existing function which you don’t have access to. Lets say that you have a dll where you want to add your functionality, so in this case you can extent the functionality of the dll using the extension methods. We use this for implementing the extension methods.
Overriding is implemented in c sharp using the Virtual and Override keywords, but in case of overloading we change the number of arguments or datatypes.
You may be interested in below interview questions:
this keyword is used to denote the current instance of the object. The this keyword is used when we want to use a object within our function.
There are two ways that we can implement comments in our application. They are single line comments and multi line comments. Single line of comments are useful when we want to comment a single line of code. // is used at the starting of the line. Multi line comments are used when we want to comment more than one line of code.We place /* at the starting and */ at the end of the line where you want to end the comment.
How can we check the status of a checkbox?
Sign up for our newsletter to receive the latest news and event postings.