Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Short answer: What is a release pipeline and how does it differ from a build pipeline? Answer: A build pipeline (CI) compiles, tests, and packages your code — it produces artifacts. A release pipeline (CD) takes those ar…
Short answer: What is a build pipeline in Azure DevOps? Answer: A build pipeline in Azure DevOps automates how your code is compiled, tested, and packaged whenever you make changes. It’s part of Continuous Integration (C…
Short answer: LinkedList<T> is a doubly linked list collection in C#. It stores elements as nodes, where each node contains the data and references to the previous and next nodes. Allows efficient insertions and de…
Short answer: ConcurrentDictionary<TKey, TValue> is a thread-safe dictionary designed for concurrent access by multiple threads without needing external synchronization (locks). Supports atomic operations like addi…
Short answer: SortedSet<T> is a collection that stores unique elements in sorted order. Implements a self-balancing binary search tree (usually a Red-Black Tree). Automatically maintains elements in ascending sorte…
Short answer: SortedList<TKey, TValue> is a collection of key-value pairs that maintains the elements sorted by keys. Implements both IDictionary<TKey, TValue> and IList<KeyValuePair<TKey, TValue>>…
Short answer: LinkedList<T> is a doubly linked list collection in C#. Explain a bit more It stores elements as nodes, where each node contains the data and references to the previous and next nodes. Example code Li…
Short answer: HashSet<T> is a generic collection that stores unique elements with no particular order. It is optimized for fast lookups, additions, and deletions. Use case: When you want to store a collection of un…
Short answer: A Stack<T> is a generic collection in C# that stores elements in a Last-In, First-Out (LIFO) order. The last element added is the first one removed Belongs to System.Collections.Generic Real-world use…
Short answer: A Queue<T> is a generic collection in C# that stores elements in a First-In, First-Out (FIFO) order. The first item added is the first to be removed. It is part of the System.Collections.Generic names…
Short answer: A Dictionary<TKey, TValue> is a generic collection in C# that stores data as key-value pairs. It provides fast lookup, addition, and removal of values based on their keys. Keys must be unique Keys mus…
Short answer: List<T> is a generic collection in C# that represents a dynamically sized list of elements. It resides in the System.Collections.Generic namespace and grows or shrinks as needed. Use it when: You need…
Short answer: Generic collections are type-safe and defined using generics (<T>), allowing you to specify the type of elements they hold. Explain a bit more This ensures compile-time type checking and eliminates th…
Short answer: Collection<T> is a base class for creating custom collections. It wraps an IList<T> internally and provides virtual methods for insert, remove, and clear, allowing easy customization. Unlike Lis…
Short answer: IComparer<T> defines a method Compare(T x, T y) for custom sorting logic (used in sorting operations like Sort()). IEqualityComparer<T> defines methods Equals(T x, T y) and GetHashCode(T obj) to…
Short answer: What is a project in Azure DevOps and what resources can it include? Explain a bit more Answer: A project in Azure DevOps is like a container for everything related to a specific application or product. It…
Short answer: A project in Azure DevOps is like a container for everything related to a specific application or product. It can include: Code repositories Work items (stories, bugs) Pipelines (build/release) Test cases A…
Short answer: Azure Artifacts is a service in Azure DevOps that lets you store, share, and manage packages like NuGet, npm, Maven, or Python packages — all in one secure place. It’s basically your private package feed, j…
Short answer: Azure Artifacts is a service in Azure DevOps that lets you store, share, and manage packages like NuGet, npm, Maven, or Python packages — all in one secure place. It’s basically your private package feed, j…
Short answer: What is the purpose of the dotnet build, dotnet test, and dotnet publish commands in pipelines? Answer: dotnet build → Compiles your code and checks for errors. dotnet test → Runs all your unit tests. dotne…
Short answer: What is the difference between an organization, project, and repository in Azure DevOps? Answer: Organization: The top-level container (like a company or department). Project: A workspace for a specific pro…
Short answer: double Calculate(double a, double b, char op) Example code { return op switch { '+' => a + b, Follow on: '-' => a - b, '*' => a * b, '/' => b != 0 ? a / b : throw new DivideByZeroException(), _…
Short answer: a / b : throw new DivideByZeroException(), _ => throw new ArgumentException("Invalid operator"), Explanation: Simple switch statement performing basic arithmetic, with divide-by-zero check. Exp…
Short answer: NgZone monitors async operations (like promises, timers) and triggers Angular’s change detection automatically after they complete. It helps Angular know when to update the UI. You can run code outside Angu…
Short answer: ngular applications. Common Commands: ng new my-app # Create new Angular project ng serve # Run development server ng generate component login # Generate component ng build # Build for production ng test #…
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: What is a release pipeline and how does it differ from a build pipeline? Answer: A build pipeline (CI) compiles, tests, and packages your code — it produces artifacts. A release pipeline (CD) takes those artifacts and deploys them to different environments like Dev, QA, or Production.
Build Pipeline: Compiles your .NET app and outputs a .zip file. Release Pipeline: Takes that .zip and deploys it to Azure App Service. So, the build pipeline = create, and release pipeline = deliver.
ShopNest’s YAML pipeline builds on every PR, runs unit tests, then deploys to a staging slot on main-branch merges.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: What is a build pipeline in Azure DevOps? Answer: A build pipeline in Azure DevOps automates how your code is compiled, tested, and packaged whenever you make changes. It’s part of Continuous Integration (CI) — where every code check-in triggers an automatic build to ensure nothing is broken.
When a developer pushes code to main, Azure Pipelines automatically compiles your .NET app, runs unit tests, and generates a build artifact (like a .zip or .dll) ready for deployment.
ShopNest’s YAML pipeline builds on every PR, runs unit tests, then deploys to a staging slot on main-branch merges.
C# Collections C# Programming Tutorial · Collections
Short answer: LinkedList<T> is a doubly linked list collection in C#. It stores elements as nodes, where each node contains the data and references to the previous and next nodes. Allows efficient insertions and deletions anywhere in the list. Does not support indexed access like List<T>.
LinkedList<int> numbers = new LinkedList<int>(); numbers.AddLast(10); numbers.AddLast(20);
In ShopNest, an order page loads products with List<Product> so you can Add items to the cart and access them by index. Use IEnumerable<T> when you only need to loop (for example, printing invoice lines).
C# Collections C# Programming Tutorial · Collections
Short answer: ConcurrentDictionary<TKey, TValue> is a thread-safe dictionary designed for concurrent access by multiple threads without needing external synchronization (locks). Supports atomic operations like adding, updating, and removing items. Useful in multi-threaded scenarios where data integrity and performance are critical.
ConcurrentDictionary<int, string> concurrentDict = new ConcurrentDictionary<int, string>(); concurrentDict.TryAdd(1, "One"); concurrentDict.TryUpdate(1, "Uno", "One");
C# Collections C# Programming Tutorial · Collections
Short answer: SortedSet<T> is a collection that stores unique elements in sorted order. Implements a self-balancing binary search tree (usually a Red-Black Tree). Automatically maintains elements in ascending sorted order. Provides set operations like union, intersection, and difference.
SortedSet<int> sortedSet = new SortedSet<int> { 5, 1, 3 }; sortedSet.Add(2); // Sorted order maintained: {1, 2, 3, 5}
When applying a coupon, ShopNest keeps used coupon codes in a HashSet<string> so “already used?” checks stay fast and unique.
C# Collections C# Programming Tutorial · Collections
Short answer: SortedList<TKey, TValue> is a collection of key-value pairs that maintains the elements sorted by keys. Implements both IDictionary<TKey, TValue> and IList<KeyValuePair<TKey, TValue>>. Keys are automatically sorted in ascending order based on their natural comparer or a provided comparer.
SortedList<int, string> sortedList = new SortedList<int, string>(); sortedList.Add(3, "Three"); sortedList.Add(1, "One"); sortedList.Add(2, "Two"); The elements are stored sorted by key: 1, 2, 3.
In ShopNest, an order page loads products with List<Product> so you can Add items to the cart and access them by index. Use IEnumerable<T> when you only need to loop (for example, printing invoice lines).
C# Collections C# Programming Tutorial · Collections
Short answer: LinkedList<T> is a doubly linked list collection in C#.
It stores elements as nodes, where each node contains the data and references to the previous and next nodes.
LinkedList<int> numbers = new LinkedList<int>(); numbers.AddLast(10); numbers.AddLast(20);
In ShopNest, an order page loads products with List<Product> so you can Add items to the cart and access them by index. Use IEnumerable<T> when you only need to loop (for example, printing invoice lines).
C# Collections C# Programming Tutorial · Collections
Short answer: HashSet<T> is a generic collection that stores unique elements with no particular order. It is optimized for fast lookups, additions, and deletions. Use case: When you want to store a collection of unique items without duplicates, such as user IDs, tags, or keywords. HashSet<int> uniqueNumbers = new HashSet<int> { 1, 2, 3 }; uniqueNumbers.Add(4);
C# Collections C# Programming Tutorial · Collections
Short answer: A Stack<T> is a generic collection in C# that stores elements in a Last-In, First-Out (LIFO) order. The last element added is the first one removed Belongs to System.Collections.Generic Real-world use case: Undo operations, browser history, expression evaluation.
Stack<int> numbers = new Stack<int>(); numbers.Push(10); numbers.Push(20); // Top of the stack
C# Collections C# Programming Tutorial · Collections
Short answer: A Queue<T> is a generic collection in C# that stores elements in a First-In, First-Out (FIFO) order. The first item added is the first to be removed. It is part of the System.Collections.Generic namespace. Use case: Modeling real-world queues — e.g., print jobs, task scheduling, or customer service systems.
Queue<string> orders = new Queue<string>(); orders.Enqueue("Order1"); orders.Enqueue("Order2");
C# Collections C# Programming Tutorial · Collections
Short answer: A Dictionary<TKey, TValue> is a generic collection in C# that stores data as key-value pairs. It provides fast lookup, addition, and removal of values based on their keys. Keys must be unique Keys must be non-null (for reference types) Values can be null if the type allows it
Dictionary<string, int> ages = new Dictionary<string, int>(); ages.Add("Alice", 30); ages.Add("Bob", 25); Use case: Storing user profiles by ID, or mapping product names to prices.
ShopNest caches product prices in a Dictionary<string, decimal> keyed by SKU so checkout can look up a price in O(1) instead of scanning a list.
C# Collections C# Programming Tutorial · Collections
Short answer: List<T> is a generic collection in C# that represents a dynamically sized list of elements. It resides in the System.Collections.Generic namespace and grows or shrinks as needed. Use it when: You need a resizable array-like structure You want to perform frequent insertions, deletions, and searches
List<string> names = new List<string>(); names.Add("Alice");
In ShopNest, an order page loads products with List<Product> so you can Add items to the cart and access them by index. Use IEnumerable<T> when you only need to loop (for example, printing invoice lines).
C# Collections C# Programming Tutorial · Collections
Short answer: Generic collections are type-safe and defined using generics (<T>), allowing you to specify the type of elements they hold.
This ensures compile-time type checking and eliminates the need for casting. Non-generic collections, on the other hand, store elements as objects (object type), requiring boxing/unboxing for value types and casting for reference types. Example: // Generic collection List<int> numbers = new List<int>(); numbers.Add(10); // No boxing, type-safe // Non-generic collection ArrayList list = new ArrayList(); int value = (int)list[0]; // Needs casting Real-world use case: In applications dealing with specific data types (e.g., a list of customer IDs), generic collections are ideal. Non-generic collections may be used in legacy systems or when dealing with multiple data types.
list.Add(10); // Boxing occurs
C# Collections C# Programming Tutorial · Collections
Short answer: Collection<T> is a base class for creating custom collections. It wraps an IList<T> internally and provides virtual methods for insert, remove, and clear, allowing easy customization. Unlike List<T>, which is optimized for performance, Collection<T> focuses on extensibility. Useful when you want to create a collection with customized behaviors (e.g., validation, event firing).
C# Collections C# Programming Tutorial · Collections
Short answer: IComparer<T> defines a method Compare(T x, T y) for custom sorting logic (used in sorting operations like Sort()). IEqualityComparer<T> defines methods Equals(T x, T y) and GetHashCode(T obj) to determine equality and hashing (used in dictionaries, sets, etc.). They allow collections to customize how items are compared or checked for equality, beyond default implementations.
In ShopNest checkout, choose the collection by need: List for ordered cart lines, Dictionary for fast SKU lookup, HashSet for unique tags.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: What is a project in Azure DevOps and what resources can it include?
Answer: A project in Azure DevOps is like a container for everything related to a specific application or product. It can include: Code repositories Work items (stories, bugs) Pipelines (build/release) Test cases Artifacts Example: You might have a project named “ShoppingCartApp” that includes its code repo, CI/CD pipeline, and all user stories related to that app.
Azure DevOps holds ShopNest repos, boards, and release pipelines in one place so build + deploy stay repeatable.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: A project in Azure DevOps is like a container for everything related to a specific application or product. It can include: Code repositories Work items (stories, bugs) Pipelines (build/release) Test cases Artifacts Example: You might have a project named “ShoppingCartApp” that includes its code repo, CI/CD pipeline, and all user stories related to that app.
A “Add UPI payment” feature is a User Story with Tasks. Testers link bugs to the same work item for traceability.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: Azure Artifacts is a service in Azure DevOps that lets you store, share, and manage packages like NuGet, npm, Maven, or Python packages — all in one secure place. It’s basically your private package feed, just like NuGet.org, but private to your organization.
Azure DevOps holds ShopNest repos, boards, and release pipelines in one place so build + deploy stay repeatable.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: Azure Artifacts is a service in Azure DevOps that lets you store, share, and manage packages like NuGet, npm, Maven, or Python packages — all in one secure place. It’s basically your private package feed, just like NuGet.org, but private to your organization.
Azure DevOps holds ShopNest repos, boards, and release pipelines in one place so build + deploy stay repeatable.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: What is the purpose of the dotnet build, dotnet test, and dotnet publish commands in pipelines? Answer: dotnet build → Compiles your code and checks for errors. dotnet test → Runs all your unit tests. dotnet publish → Packages your app for deployment (e.g., to Azure Web App).
In a pipeline: script: dotnet build script: dotnet test script: dotnet publish -c Release -o $(Build.ArtifactStagingDirectory) The final publish step outputs deployable files like .dll or .zip.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: What is the difference between an organization, project, and repository in Azure DevOps? Answer: Organization: The top-level container (like a company or department). Project: A workspace for a specific product or app. Repository: Where your source code lives. Example: Organization: ContosoTech → Project: MobileApp → Repository: ContosoApp-Frontend
Azure DevOps holds ShopNest repos, boards, and release pipelines in one place so build + deploy stay repeatable.
C# Coding Interview C# Programming Tutorial · Coding
Short answer: double Calculate(double a, double b, char op)
{
return op switch
{ '+' => a + b, Follow on: '-' => a - b, '*' => a * b, '/' => b != 0 ? a / b : throw new DivideByZeroException(), _ => throw new ArgumentException("Invalid operator"), }; } Explanation: Simple switch statement performing basic arithmetic, with divide-by-zero check.
In coding rounds, state complexity aloud, write a clear ShopNest-flavored example (orders, carts), then handle edge cases (empty list, null, overflow).
C# Coding Interview C# Programming Tutorial · Coding
Short answer: a / b : throw new DivideByZeroException(), _ => throw new ArgumentException("Invalid operator"), Explanation: Simple switch statement performing basic arithmetic, with divide-by-zero check.
a / b : throw new DivideByZeroException(), _ => throw new ArgumentException("Invalid operator"), Explanation: Simple switch statement performing basic arithmetic, with divide-by-zero check. a / b : throw new DivideByZeroException(), _ => throw new ArgumentException("Invalid operator"), Explanation: Simple switch statement performing basic arithmetic, with divide-by-zero check.
In coding rounds, state complexity aloud, write a clear ShopNest-flavored example (orders, carts), then handle edge cases (empty list, null, overflow).
Angular Angular Tutorial · Angular
Short answer: NgZone monitors async operations (like promises, timers) and triggers Angular’s change detection automatically after they complete. It helps Angular know when to update the UI. You can run code outside Angular’s zone to avoid unnecessary change detection, improving performance.
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: ngular applications. Common Commands: ng new my-app # Create new Angular project ng serve # Run development server ng generate component login # Generate component ng build # Build for production ng test # Run unit tests Real-Time In a company, developers use ng generate component invoice to create a new invoice component with all… required files.…… ngular Components & Templates The @Component decorator defines a…
component in Angular. ngular applications. Common Commands: ng new my-app # Create new Angular project ng serve # Run development server ng generate component login # Generate component ng build # Build for production ng test # Run unit tests Real-Time
In a company, developers use ng generate component invoice to create a new invoice component with all… required files.… ngular Components & Templates The @Component decorator defines a component in Angular. ngular applications. Common Commands: ng new my-app # Create new Angular project ng serve # Run development server ng generate component login # Generate component ng build # Build for production ng test # Run unit tests Real-Time Example: In a company, developers use ng generate component invoice to create a new invoice component with all required files.… ngular Components & Templates The @Component decorator defines a component in Angular. ngular applications. Common Commands: ng new my-app # Create new Angular project ng serve # Run development server ng generate component login # Generate component ng build # Build for production ng test # Run unit tests Real-Time Example: In a company, developers use ng generate component invoice to create a new invoice component with all required files. ngular Components & Templates The @Component decorator defines a component in Angular. It tells Angular how to create nd display the component by providing metadata such as the selector, template, and styles. ✅ Example: @Component({ selector: 'app-user-card', templateUrl: './user-card.component.html', styleUrls: ['./user-card.component.css'] }) export class UserCardComponent {} 📌 Real-Time Example: In a CRM app, @Component({ selector: 'app-customer' }) is used to define a reusable customer display card. the different types. Data binding connects the component's class logic with its template (HTML). ✳ Types of Data Binding: Type Syntax Description Interpolation {{ value }} Bind component data to HTML Property Binding [property]="val ue" Bind DOM properties to component Event Binding (event)="handle r()" Bind DOM events to component methods Two-Way Binding [(ngModel)]="va lue" Sync data both ways (input ↔ component) ✅ Example: <!-- Interpolation --> <h1>{{ title }}</h1> <!-- Property Binding --> <input [value]="name" /> <!-- Event Binding --> <button (click)="greetUser()">Greet</button> <!-- Two-Way Binding --> <input [(ngModel)]="username" /> in templates? *ngIf: Conditionally includes or removes an element. *ngFor: Iterates over a list and renders template for each item. ✅ Example: <!-- *ngIf --> <div *ngIf="isLoggedIn">Welcome, {{ user.name }}</div> <!-- *ngFor --> <ul> <li *ngFor="let product of products">{{ product.name }}</li> </ul> 📌 Real-Time Example: E-commerce product list: *ngFor displays product cards dynamically. ngular? ➤ Parent to Child: Use @Input() // child.component.ts @Input() userData: any; <!-- parent.component.html --> <app-child [userData]="user"></app-child> ➤ Child to Parent: Use @Output() + EventEmitter // child.component.ts @Output() notify = new EventEmitter<string>(); this.notify.emit('Hello Parent!'); <!-- parent.component.html --> <app-child (notify)="handleNotification($event)"></app-child> 📌 Real-Time Example: Pass user object to UserCardComponent via @Input. Emit "user clicked" event back to parent with @Output. describe them. Lifecycle hooks are methods that Angular calls at specific stages of a component's existence. 🌀 Common Lifecycle Hooks: Hook Description ngOnInit Called once after component is initialized ngOnChanges Called when input properties change ngDoCheck Called during every change detection ngAfterViewI nit Called after component’s view has been initialized ngOnDestroy Cleanup just before the component is destroyed ngOnChanges() is called whenever an @Input() property changes in the component. ✅ Example: @Input() user: User; ngOnChanges(changes: SimpleChanges) { console.log('User changed:', changes.user.currentValue); } 📌 Real-Time Example: When a new user is selected in a dashboard, ngOnChanges() updates the user detail card dynamically. do you implement it? Two-way data binding means synchronizing the view and the component model utomatically. ✅ Syntax: <input [(ngModel)]="username" /> Requires importing FormsModule. 📌 Real-Time Example: In a login form, updating the email input field updates the email property in the component instantly. ngular provides two ways: ➤ Template-Driven Forms: Use ngModel, required, etc. <form #form="ngForm"> <input name="email" [(ngModel)]="email" required /> <div *ngIf="form.controls.email?.invalid">Email is required.</div> </form> ➤ Reactive Forms: Use FormGroup, FormControl, and Validators. form = new FormGroup({ email: new FormControl('', [Validators.required, Validators.email]) }); 📌 Real-Time Example: Login or signup forms showing real-time validation messages. Use Reactive Forms to generate controls at runtime. ✅ Example: form: FormGroup; constructor(private fb: FormBuilder) {} ngOnInit() { this.form = this.fb.group({}); this.questions.forEach(q => { this.form.addControl(q.key, new FormControl('')); }); } 📌 Real-Time Example: Survey builder where form fields change based on user selections. be used? ngModel is a directive that enables two-way data binding in template-driven forms. ✅ Example: <input [(ngModel)]="name" /> Use it when: Working with template-driven forms Simple input binding is sufficient Must import FormsModule. 📌 Real-Time Example: Live search input field using [(ngModel)]="searchQuery" for filtering products. ngular Directives ttribute directives in Angular? ➤ Structural Directives: Change the structure/layout of the DOM by adding or removing elements. Prefix: * (e.g., *ngIf, *ngFor) Examples: *ngIf – conditionally includes elements *ngFor – loops over data to render elements *ngSwitch – conditionally renders one view out of many ➤ Attribute Directives: Change the appearance or behavior of an existing DOM element or component. Examples: ngClass – dynamically sets CSS classes ngStyle – sets inline styles dynamically Custom highlight directive (e.g., change color on hover) ✅ Real-Time Analogy: Structural: Like building or removing walls in a house (changes structure). Attribute: Like painting the walls (changes appearance only). directives in Angular? ➤ *ngIf: Conditionally displays content <div *ngIf="isLoggedIn">Welcome!</div> ➤ *ngFor: Iterates over a list <li *ngFor="let item of items">{{ item.name }}</li> ➤ ngSwitch: Selectively renders based on a condition <div [ngSwitch]="status"> <p *ngSwitchCase="'active'">Active</p> <p *ngSwitchCase="'inactive'">Inactive</p> <p *ngSwitchDefault>Unknown</p> </div> ngular? ➤ Steps:
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.