CSharp Interview Questions
CSharp Interview Questions
10. What is the difference between `abstract` class and `interface` in C#?
An `abstract` class can have implementations for some of its members but cannot be
instantiated. An `interface` only defines members without any implementation. Classes can
inherit from multiple interfaces but only from one abstract class.
14. What is the difference between `throw` and `throw ex` in C#?
`throw` rethrows the original exception, preserving the original stack trace, while `throw ex`
throws the current exception, resetting the stack trace and losing the original error context.