From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?



From a versioning perspective, what are the drawbacks of extending an interface as opposed to extend..

Answer / Rimpy Yadav

When extending an interface, you only implement methods but do not inherit any properties or fields. This means that if new properties or fields are added to the interface in future versions, existing classes will not have those by default. Conversely, when extending a class, you get all its properties and fields as well, allowing for easier backward compatibility.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Is null empty or whitespace c#?

1 Answers  


What is the symbol used for in c#?

1 Answers  


What is difference between C# and VB.NET?

1 Answers   CDC,


How do you serialize an object?

1 Answers  


Hi Everyone, the design of the form disappear during writing codes for dataset and data grid. The error show in "line of assigning dataset". I don't know what's happen. If anyone know , please share of technical help from someone. Thanks, Horace Trever

1 Answers  


What is difference between events and delegates?

1 Answers  


Why to use lock statement in c#?

1 Answers  


Why delegates are safe in c#?

1 Answers  


What does firstordefault mean in c#?

1 Answers  


What is the use of xmlserializer?

1 Answers  


Why we use methods in c#?

1 Answers  


Is c# still popular?

1 Answers  


Categories