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–75 of 120

Career & HR topics

By tech stack

Junior PDF
What is encapsulation in OOP?

Encapsulation is the mechanism of hiding internal details of an object and exposing only necessary functionalities. It helps in protecting data and maintaining control over how it is accessed or modified. Example: A Bank…

Junior PDF
What is the role of private and public access modifiers in encapsulation?

Private → Hides data from outside access, ensuring security. Public → Provides controlled access through properties or methods. Example: private decimal balance; // hidden public decimal Balance { get { return balance; }…

Junior PDF
What is the use of internal, protected, and protected internal?

Internal → Accessible only within the same assembly. Protected → Accessible in the class and derived classes. Protected Internal → Accessible in derived classes or within the same assembly. Example: protected string acco…

Junior PDF
What is the use of properties in encapsulation?

Properties provide controlled access to private fields. Enable validation, read-only/write-only access, and future flexibility. Example: private int score; public int Score { get { return score; } set { if (value >= 0…

Junior PDF
What is abstraction in OOP?

Abstraction is the process of hiding the internal implementation details of a system and exposing only the essential features. It allows developers to focus on what an object does, not how it does it. Example: A Vehicle…

Junior PDF
What is the difference between interface-based and abstract class-based abstraction?

Feature Abstract Class Interface Methods Can have abstract + concrete methods Only abstract methods (C# 8+ allows default implementation) Fields Can have fields Cannot have fields Inheritance Single inheritance Multiple…

Junior PDF
What is the purpose of abstraction in large systems?

Answer: Reduces system complexity by focusing on essential features. Decouples modules, making large systems easier to maintain and extend. Promotes code reuse and flexibility. What interviewers expect A clear definition…

Junior PDF
What is the base class and derived class?

Answer: Base Class (Parent) → Class whose members are inherited. Derived Class (Child) → Class that inherits from base class. class Vehicle { public void Start() {} } // Base class Car : Vehicle {} // Derived What interv…

Junior PDF
What is the : base() keyword used for?

Calls the constructor of the base class from a derived class. Ensures base class initialization before derived class constructor runs. class Vehicle { public Vehicle(string brand) { Console.WriteLine(brand); } } class Ca…

Junior PDF
What is the workaround for multiple inheritance in C#?

Use interfaces to achieve multiple inheritance. A class can implement multiple interfaces. interface IFlyable { void Fly(); } interface IDriveable { void Drive(); } class FlyingCar : IFlyable, IDriveable { public void Fl…

Junior PDF
What is the difference between inheritance and composition?

Answer: Feature Inheritance Composition Relationship "is-a" "has-a" Reuse Derived class reuses base class Object contains other objects Flexibility Less flexible More flexible Example: Inheritance → Car is a Vehicle Comp…

Junior PDF
What is method overriding?

Derived class provides a new implementation for a virtual method in base class. Enables runtime polymorphism. class Vehicle { public virtual void Start() => Console.WriteLine("Vehicle starts"); } class Car : Vehicle {…

Junior PDF
What is the use of the virtual and override keywords?

Answer: virtual → Marks a base class method as overridable. override → Overrides a virtual method in the derived class. What interviewers expect A clear definition tied to OOP in C# OOP projects Trade-offs (performance,…

Junior PDF
What is the sealed keyword?

Answer: Prevents a class from being inherited or a method from being overridden. sealed class FinalClass { } class Car : FinalClass { } // Not allowed What interviewers expect A clear definition tied to OOP in C# OOP pro…

Junior PDF
What is the difference between new and override in inheritance?

override → Overrides a virtual method in base class (runtime polymorphism). new → Hides a base class method (compile-time hiding, not true overriding). class Vehicle { public void Start() => Console.WriteLine("Vehicle…

Junior PDF
What is the constructor order in inheritance?

Answer: Base class constructor executes first, then derived class constructor. Ensures base members are initialized before derived members. What interviewers expect A clear definition tied to OOP in C# OOP projects Trade…

Junior PDF
What is polymorphism in OOP?

Answer: Polymorphism means “many forms”. It allows objects of different types to be treated as objects of a common base type. Achieved through method overloading, overriding, and interfaces. What interviewers expect A cl…

Junior PDF
What is compile-time polymorphism?

Also called static polymorphism. Resolved at compile time. Achieved through method overloading or operator overloading. class Calculator { public int Add(int a, int b) => a + b; public double Add(double a, double b) =…

Junior PDF
What is runtime polymorphism?

Also called dynamic polymorphism. Resolved at runtime using method overriding. class Vehicle { public virtual void Start() => Console.WriteLine("Vehicle starts"); } class Car : Vehicle { public override void Start() =…

Junior PDF
What is method overloading?

Answer: Same method name with different parameters in the same class. Enables compile-time polymorphism. class MathHelper { public int Multiply(int a, int b) => a * b; public int Multiply(int a, int b, int c) =&am…

Junior PDF
What is operator overloading?

Answer: Defining custom behavior for operators (+, -, *, etc.) for a class. class Point { public int X, Y; public static Point operator +(Point a, Point b) => new Point { X = a.X + b.X, Y = a.Y + b.Y }; } What int…

Junior PDF
What is the difference between overriding and overloading?

Answer: Feature Overloading Overriding Compile/Runtime Compile-time Runtime Same signature? No, different parameters Same signature Virtual required? No Yes Inheritance required? Not required Required What interviewers e…

Junior PDF
What is late binding and early binding?

Answer: Early binding → Resolved at compile time (e.g., method overloading). Late binding → Resolved at runtime (e.g., method overriding with virtual/override). What interviewers expect A clear definition tied to OOP in…

Junior PDF
What is the object class in C# and its relation to polymorphism?

Answer: object is the base class for all C# types. Enables polymorphism, as any object can be referred using object type. object obj = new Car(); What interviewers expect A clear definition tied to OOP in C# OOP projects…

Junior PDF
What is the role of interfaces in achieving polymorphism?

Interfaces allow different classes to implement the same contract, enabling dynamic behavior at runtime. interface IDriveable { void Drive(); } class Car : IDriveable { public void Drive() => Console.WriteLine("Car dr…

C# OOP C# Programming Tutorial · OOP

  • Encapsulation is the mechanism of hiding internal details of an object and

exposing only necessary functionalities.

  • It helps in protecting data and maintaining control over how it is accessed or

modified.

Example: A BankAccount class hides its balance and only allows deposit/withdraw

operations:

private decimal balance;
public void Deposit(decimal amount) { if(amount > 0) balance +=

mount; }

Permalink & share

C# OOP C# Programming Tutorial · OOP

  • Private → Hides data from outside access, ensuring security.
  • Public → Provides controlled access through properties or methods.

Example:

private decimal balance; // hidden
public decimal Balance { get { return balance; } } // read-only

ccess

Permalink & share

C# OOP C# Programming Tutorial · OOP

  • Internal → Accessible only within the same assembly.
  • Protected → Accessible in the class and derived classes.
  • Protected Internal → Accessible in derived classes or within the same assembly.

Example:

protected string accountType; // accessible in derived classes

internal string branchCode; 	// accessible within same assembly
Permalink & share

C# OOP C# Programming Tutorial · OOP

  • Properties provide controlled access to private fields.
  • Enable validation, read-only/write-only access, and future flexibility.

Example:

private int score;
public int Score
{

get { return score; }

set { if (value >= 0) score = value; } // validation
}
Permalink & share

C# OOP C# Programming Tutorial · OOP

  • Abstraction is the process of hiding the internal implementation details of a

system and exposing only the essential features.

  • It allows developers to focus on what an object does, not how it does it.

Example: A Vehicle class exposes Start() method without revealing engine details.

Permalink & share

C# OOP C# Programming Tutorial · OOP

Feature Abstract Class Interface

Methods Can have abstract +

concrete methods

Only abstract methods (C# 8+ allows default

implementation)

Fields Can have fields Cannot have fields

Inheritance Single inheritance Multiple interfaces can be implemented

Constructo

Can have constructors Cannot have constructors

Permalink & share

C# OOP C# Programming Tutorial · OOP

Answer: Reduces system complexity by focusing on essential features. Decouples modules, making large systems easier to maintain and extend. Promotes code reuse and flexibility.

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: Base Class (Parent) → Class whose members are inherited. Derived Class (Child) → Class that inherits from base class. class Vehicle { public void Start() {} } // Base class Car : Vehicle {} // Derived

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

  • Calls the constructor of the base class from a derived class.
  • Ensures base class initialization before derived class constructor runs.
class Vehicle { public Vehicle(string brand) {

Console.WriteLine(brand); } }

class Car : Vehicle
{
public Car(string brand) : base(brand) { Console.WriteLine("Car

created"); }

}
Permalink & share

C# OOP C# Programming Tutorial · OOP

  • Use interfaces to achieve multiple inheritance.
  • A class can implement multiple interfaces.
interface IFlyable { void Fly(); }
interface IDriveable { void Drive(); }
class FlyingCar : IFlyable, IDriveable { public void Fly() {} public

void Drive() {} }

Permalink & share

C# OOP C# Programming Tutorial · OOP

Answer: Feature Inheritance Composition Relationship "is-a" "has-a" Reuse Derived class reuses base class Object contains other objects Flexibility Less flexible More flexible Example: Inheritance → Car is a Vehicle Composition → Car has a Engine

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

  • Derived class provides a new implementation for a virtual method in base class.
  • Enables runtime polymorphism.
class Vehicle { public virtual void Start() =>

Console.WriteLine("Vehicle starts"); }

class Car : Vehicle { public override void Start() =>

Console.WriteLine("Car starts"); }

Permalink & share

C# OOP C# Programming Tutorial · OOP

Answer: virtual → Marks a base class method as overridable. override → Overrides a virtual method in the derived class.

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: Prevents a class from being inherited or a method from being overridden. sealed class FinalClass { } class Car : FinalClass { } // Not allowed

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

  • override → Overrides a virtual method in base class (runtime polymorphism).
  • new → Hides a base class method (compile-time hiding, not true overriding).
class Vehicle { public void Start() => Console.WriteLine("Vehicle");
}
class Car : Vehicle { public new void Start() =>

Console.WriteLine("Car"); }

Permalink & share

C# OOP C# Programming Tutorial · OOP

Answer: Base class constructor executes first, then derived class constructor. Ensures base members are initialized before derived members.

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: Polymorphism means “many forms”. It allows objects of different types to be treated as objects of a common base type. Achieved through method overloading, overriding, and interfaces.

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

  • Also called static polymorphism.
  • Resolved at compile time.
  • Achieved through method overloading or operator overloading.
class Calculator
{
public int Add(int a, int b) => a + b;
public double Add(double a, double b) => a + b; // Overloaded

method

}
Permalink & share

C# OOP C# Programming Tutorial · OOP

  • Also called dynamic polymorphism.
  • Resolved at runtime using method overriding.
class Vehicle { public virtual void Start() =>

Console.WriteLine("Vehicle starts"); }

class Car : Vehicle { public override void Start() =>

Console.WriteLine("Car starts"); }

Vehicle v = new Car();

v.Start(); // Calls Car's Start() at runtime

Permalink & share

C# OOP C# Programming Tutorial · OOP

Answer: Same method name with different parameters in the same class. Enables compile-time polymorphism. class MathHelper { public int Multiply(int a, int b) => a * b; public int Multiply(int a, int b, int c) => a * b * c; // Overloaded }

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: Defining custom behavior for operators (+, -, *, etc.) for a class. class Point { public int X, Y; public static Point operator +(Point a, Point b) => new Point { X = a.X + b.X, Y = a.Y + b.Y }; }

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: Feature Overloading Overriding Compile/Runtime Compile-time Runtime Same signature? No, different parameters Same signature Virtual required? No Yes Inheritance required? Not required Required

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: Early binding → Resolved at compile time (e.g., method overloading). Late binding → Resolved at runtime (e.g., method overriding with virtual/override).

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: object is the base class for all C# types. Enables polymorphism, as any object can be referred using object type. object obj = new Car();

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

  • Interfaces allow different classes to implement the same contract, enabling

dynamic behavior at runtime.

interface IDriveable { void Drive(); }
class Car : IDriveable { public void Drive() =>

Console.WriteLine("Car drives"); }

class Bike : IDriveable { public void Drive() =>

Console.WriteLine("Bike drives"); }

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