C#.Net Interview Question and Answers

6. What are the basic concepts of object oriented programming?
 
    It is necessary to understand some of the concepts used extensively in object oriented programming.These include
  • Objects
  • Classes
  • Data abstraction and encapsulation
  • Inheritance
  • Polymorphism
  • Message passing.
 
Your Name Your Email-ID
Your Answer
7. Can you inherit multiple interfaces?
  Yes. Multiple interfaces may be inherited in C#.
 
Your Name Your Email-ID
Your Answer
8. What is inheritance?
  Inheritance is deriving the new class from the already existing one.
 
Digvijay Kumar Singh,says Jan 14, 2014
Inheritance is a abstraction process that access the functionality of object and provided the overiding, Virtual and data hiding concepet.
Deependra Singh,says Jan 04, 2014
Inheritence is use for reusebility without changing any functionality.
Your Name Your Email-ID
Your Answer
9. Define scope?
  Scope refers to the region of code in which a variable may be accessed.
 
Sarabjot Singh, said Jan 25,2014
Scope refers to the boundary between which a member(such as variable,property,function) of the class is accessible. It is defined using Access Specifiers(public,private,protected etc).
Digvijay Kumar Singh, said Jan 14,2014
Scope is identify the accessibilty of class memeber,variable at specific level schu that local golbal and acess modifier is also identify the scope.
Your Name Your Email-ID
Your Answer
10. What is the difference between public, static and void?
 
  • public :The keyword public is an access modifier that tells the C# compiler that the Main method is accessible by anyone.
  • static :The keyword static declares that the Main method is a global one and can be called without creating an instance of the class. The compiler stores the address of the method as the entry point and uses this information to begin execution before any objects are created.
  • void : The keyword void is a type modifier that states that the Main method does not return any value.
 
Your Name Your Email-ID
Your Answer