Articles
Practical, deeply explained engineering writing — free to read, no sign-up required.
All Articles
Var vs Dynamic vs Object in C#
All three can store values, but they work differently. Understanding these differences helps us write safer code, avoid runtime errors and choose the right variable type in our applications.
Anonymous Methods and Lambda Expressions in C#
Both let us write a function without giving it a separate method name. They are useful when passing small pieces of logic to another method, especially with events, LINQ and collections. An anonymous method uses the delegate keyword. A lambda expression uses the => operator and usually gives us shorter, cleaner syntax.
Extension Methods in C# – Extend Existing Classes
A derived class is a class that inherits from another class. Extension methods make existing types easier to work with. You will commonly see them in LINQ, string helpers and reusable utility code.
Yield Return and Yield Break in C#
The yield keyword helps a method return items one at a time instead of creating and returning a complete collection. This is useful when processing large datasets, reading files, or generating values on demand. The method becomes an iterator, which means it produces values as the caller requests them. yield break is used to stop producing values early.
Ref vs Out Parameters in C# – Differences with Examples
Both keywords allow a method to modify a variable supplied by the caller. Normally, a method receives a copy of a value. With ref and out, the method works with the caller's variable itself. They are useful when a method needs to return or update multiple values.
Async and Await in C# – Asynchronous Programming
Async and await help applications perform operations without blocking the current thread while waiting for work to finish. A thread is a path of execution in a program. This is especially useful for database calls, API requests and file operations. It helps applications remain responsive while waiting for external operations.
Delegates, Events and Lambda Expressions
A lambda expression is a short way to write an anonymous function. These concepts are widely used in callbacks, UI applications, notifications and asynchronous programming.
LINQ in C# – Filtering, Sorting and Querying Data
LINQ stands for Language Integrated Query. It helps us search, filter, sort and transform data directly in C# code. Instead of writing lengthy loops, we can use readable methods like Where(), OrderBy() and Select(). LINQ is commonly used with lists, arrays, databases and application data.
Generics in C# – Writing Reusable Code
Generics allow us to write reusable code that works with different data types. Instead of creating separate classes or methods for integers, strings and other types, we can use one generic implementation. Generics provide type safety, reduce duplicate code and avoid unnecessary type conversions. They are widely used in collections, repositories, APIs and enterprise applications.
Collections in C# – List, Dictionary, HashSet and Queue
Collections store and manage groups of objects. Unlike arrays, many collections can grow or shrink dynamically. C# provides different collection types for different requirements. We will explore List, Dictionary, HashSet and Queue. These are commonly used in APIs, shopping applications, banking systems and enterprise software.
Interfaces and Abstract Classes in C#
Both help us define common behaviour for different classes. An interface defines a contract that a class must follow. An abstract class can provide both common code and methods that child classes must implement. These concepts are widely used in enterprise applications, payment systems, dependency injection and API development.
Encapsulation and Abstraction Explained
Abstraction hides internal complexity and exposes only what users need. We use these principles in banking, payment applications, APIs and enterprise systems.