Search

How to use pattern matching in C#
By Tan Lee Published on Jan 03, 2025 220

Leverage the enhanced pattern matching capabilities in C# 8.0 to write code that is cleaner, more maintainable, and more efficient.

Read more
How to use ValueTuples in C#
By Tan Lee Published on Jan 03, 2025 228

A Tuple is a data structure consisting of an ordered, fixed-size collection of immutable elements, each of a specific type that cannot be modified.

Read more
How to use asynchronous streams in C#
By Tan Lee Published on Jan 03, 2025 231

In C# 8.0, asynchronous programming is enhanced with the introduction of IAsyncEnumerable, allowing for the efficient consumption and creation of data streams asynchronously.

Read more
How to use indices and ranges in C#
By Tan Lee Published on Jan 03, 2025 301

In C# 8.0, two important new features, System.Index and System.Range, have been introduced to simplify indexing and slicing operations for collections.

Read more
DateTime.Now vs DateTime.UtcNow
By Tan Lee Published on Jan 03, 2025 495

In this article, we explore the differences between DateTime.Now and DateTime.UtcNow in C#, focusing on time calculations and the significance of UTC.

Read more
How to convert a Unix timestamp to milliseconds in C#
By Tan Lee Published on Jan 03, 2025 420

In C#, to get the current Unix timestamp in milliseconds, you can use the following code:

Read more
How to use primary constructors in C#
By Tan Lee Published on Jan 02, 2025 327

In C# 12, primary constructors are introduced for classes and structs in addition to record types.

Read more
How to use IEnumerable, ICollection, IList, and IQueryable in C#
By Tan Lee Published on Jan 02, 2025 626

C# provides robust support for working with collections of data through various classes and interfaces.

Read more
Choosing Between Classes, Structs, and Records in C#
By Tan Lee Published on Jan 02, 2025 345

In this post, we will learn how to use classes, structs, and record types in C#.

Read more
Understanding Virtual and Abstract Methods in C#
By Tan Lee Published on Dec 30, 2024 308

In C#, abstract methods and virtual methods both serve important roles, but they differ in their behavior and use cases.

Read more