iGET

C# Programming - MCQ Practice Questions

C# (.NET) MCQs — OOP, collections, LINQ & exception handling.

290 questions | 100% Free

Q.21Hard

In a complex system where a class needs to inherit from multiple sources of functionality while maintaining a single base type, which C# feature is most appropriate?

Q.22Hard

A financial system implements IEquatable<Account> for comparing accounts. What is the primary benefit of implementing this interface?

Q.23Hard

In a real estate system, consider Property (base) with House and Apartment (derived). If Property has a sealed method CalculateTax(), what happens in House class?

Q.24Hard

Consider a scenario where class X implements interfaces IA and IB, and both interfaces have a method named Process(). How should X implement this?

Q.25Hard

In a healthcare system, Doctor is a derived class from Employee. If you want to ensure that Doctor's constructor calls Employee's constructor before executing, which approach is correct?