C# Interview Questions and Answers for Experienced - 2
Question: 6
What is the difference between using while and until loops?
While will loop as long as its test condition evaluates to true.
Until will loop as long as its test condition evaluates to false.
Question: 7
Differentiate between Overriding and Overloading?
Overriding – you override a virtual class.
Overloading – you overload a method with different number of parameters or different type of parameters.
Question: 8
What is shadowing?
Shadowing is used within 2 programmers come up with same method in the same class one of the methods get shadowed by scope or inheritance.
Override means that using your class throught a base class will use your method, while new means your method will only be called if accessing through your class, and when using your class throught a base class the base class method will be called. I think that shadowing is the using new, but I’m not certain.
Question: 9
What is an abstract class?
Abstract class is a class that has no direct instances, but whose descendants may have direct instances. There are case in which it is useful to define classes for which the programmer never intends to instantiate any objects; because such classes normally are used as base-classes in inheritance hierarchies, we call such classes abstract classes. These classes cannot be used to instantiate objects; because abstract classes are incomplete. Derived classes called concrete classes must define the missing pieces.
Question: 10
What are indexers?
Indexers are similar to properties, except that the get and set accessors of indexers take parameters, while property accessors do not.
- C# Interview Questions and Answers for Freshers
- C# Interview Questions for Experienced Professionals
- C# Interview Questions and Answers for Experienced
- C# Interview Questions with Answers Pdf
- C Sharp Interview Questions and Answers
- C Sharp Interview Questions and Answers for Freshers Pdf
- Top 200+ Advanced C# Interview Questions 2019-2020
- C# Programming Online Test Questions and Answers
- C# Algorithm Interview Questions and Answers
Samacheer Kalvi Class 10 Science Acoustics Questions & Answers More
Agricultural Engineering Multiple Choice Questions and Answers Pdf More
Soil, Water Conservation Engineering, Hydrology, Surveying MCQ Questions More
Irrigation and Drainage Engineering, Wells & Pumps MCQ Questions Pdf More
Agricultural Engineering Farm Power MCQ Questions and Answers More
Windows Explorer Multiple Choice Questions and Answers More
5001+ General English MCQ for Competitive Exam Pdf More
Banking General Knowledge Questions and Answers Pdf More
1000+ Canadian Western Bank Aptitude Questions and Answers More
Top 1000+ Verbal Reasoning Questions for Bank Exams More