Select Page
Using the Stopwatch Class to Log Time

Using the Stopwatch Class to Log Time

The Stopwatch Class is a really useful way to measure elapsed time in C#. It can be used to keep track of average request times, to send messages to the user based on how long an action might take, or to benchmark your code. Often the DateTime method (which is used to...
Ref Parameters vs. Out Parameters in C#

Ref Parameters vs. Out Parameters in C#

C# Params Though both ref and out parameters are used to pass arguments through a method, the C# params aren’t used in exactly the same way. Ref keywords are used to pass an argument as a reference, meaning that when the value of that parameter changes after...
Lesson 23: Working with Nullable Types

Lesson 23: Working with Nullable Types

Working with value types and data can sometimes be challenging because a value type doesn’t normally hold a null value. This lesson shows you how to overcome this limitation with C# nullable types. Here’s what you’ll learn. Understand the problem...