Interview Questions on .Net Part: 1
Abstraction Abstraction means displaying or allows access to that part of program or class which is important. Take an example. How to achieve that? Take the below example in which I am declaring four string and out of them only one is public and rest are private or protected. When we create object of this class and try to access all these variables then we get permission to access only public variable. class AbstractionWaliClass { private string my_id; private string my_name; public string my_contact_no; protected string protected_id; } Abstract Class: If you want to create a class that is only base class. No one can make instance of it. Then you should use Abstract class with the help of keyword ‘abstract’. abstract class AbstractClass { } Now what inside this class? Any method doesn’t necessary it should be abstract method bu