Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4616 total questions 4516 technical 100 career & HR 4346 from PDF library

Showing 51–57 of 57

Popular tracks

Junior PDF
What is the difference between an abstract class and a normal class?

Answer: Feature Abstract Class Normal Class Instantiation Cannot instantiate Can instantiate Methods Can have abstract methods All methods must have implementation Purpose Serve as base for inheritance General purpose us…

Junior PDF
What is the key difference between abstract classes and interfaces?

Feature Abstract Class Interface Implementation Can have full/partial implementation Cannot have full implementation (except default methods in C# 8+) Fields Can have fields Cannot have fields Inheritance Single class in…

Junior PDF
What is the Dependency Inversion Principle and how do interfaces support it?

High-level modules should not depend on low-level modules. Both should depend on abstractions. Interfaces allow decoupling and easier testing. interface ILogger { void Log(string message); } class FileLogger : ILogger {…

Junior PDF
What is the Liskov Substitution Principle and how does inheritance

Answer: ffect it? Derived classes should be replaceable by base class without affecting correctness. Inheritance violating this principle can cause unexpected behavior. What interviewers expect A clear definition tied to…

Junior PDF
What is the Liskov Substitution Principle and how does inheritance affect it?

Answer: Derived classes should be replaceable by base class without affecting correctness. Inheritance violating this principle can cause unexpected behavior. What interviewers expect A clear definition tied to OOP in C#…

Junior PDF
What is duck typing and does C# support it with interfaces?

Duck typing: "If it looks like a duck and quacks like a duck, it is a duck." Behavior is based on method/property availability, not type inheritance. C# does not support full dynamic duck typing, but interfaces enable a…

Junior PDF
What is interface default implementation and why was it introduced?

Allows interfaces to provide default method implementations. Reason: Enables adding new methods to interfaces without breaking existing implementations. interface IPrinter { void Print(string msg); void PrintInfo(string…

C# OOP C# Programming Tutorial · OOP

Answer: Feature Abstract Class Normal Class Instantiation Cannot instantiate Can instantiate Methods Can have abstract methods All methods must have implementation Purpose Serve as base for inheritance General purpose use

What interviewers expect

  • A clear definition tied to OOP in C# OOP projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production C# OOP application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in C# OOP architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

C# OOP C# Programming Tutorial · OOP

Feature Abstract Class Interface

Implementation Can have full/partial

implementation

Cannot have full implementation (except

default methods in C# 8+)

Fields Can have fields Cannot have fields

Inheritance Single class inheritance Multiple interface inheritance allowed

Constructors Allowed Not allowed

ccess

Modifiers

Can have public,

protected, private

Members are public by default

Permalink & share

C# OOP C# Programming Tutorial · OOP

  • High-level modules should not depend on low-level modules. Both should depend

on abstractions.

  • Interfaces allow decoupling and easier testing.
interface ILogger { void Log(string message); }
class FileLogger : ILogger { public void Log(string message) =>

Console.WriteLine("File: " + message); }

class UserService
{
private readonly ILogger _logger;
public UserService(ILogger logger) { _logger = logger; }
}
Permalink & share

C# OOP C# Programming Tutorial · OOP

Answer: ffect it? Derived classes should be replaceable by base class without affecting correctness. Inheritance violating this principle can cause unexpected behavior.

What interviewers expect

  • A clear definition tied to OOP in C# OOP projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production C# OOP application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in C# OOP architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

C# OOP C# Programming Tutorial · OOP

Answer: Derived classes should be replaceable by base class without affecting correctness. Inheritance violating this principle can cause unexpected behavior.

What interviewers expect

  • A clear definition tied to OOP in C# OOP projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production C# OOP application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in C# OOP architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

C# OOP C# Programming Tutorial · OOP

  • Duck typing: "If it looks like a duck and quacks like a duck, it is a duck."
  • Behavior is based on method/property availability, not type inheritance.
  • C# does not support full dynamic duck typing, but interfaces enable a similar

concept by relying on contract-based behavior.

  • Dynamic types in C# (dynamic) can also simulate duck typing.
interface IFlyable { void Fly(); }
void MakeItFly(IFlyable obj) => obj.Fly(); // Any object

implementing IFlyable works

Permalink & share

C# OOP C# Programming Tutorial · OOP

  • Allows interfaces to provide default method implementations.
  • Reason: Enables adding new methods to interfaces without breaking existing

implementations.

interface IPrinter
{

void Print(string msg);

void PrintInfo(string msg) => Console.WriteLine("Info: " + msg);

// Default

}
Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details