Ref Parameters vs. Out Parameters in C#

Though both ref and out parameters are used to pass arguments through a method, they 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 being passed through the method, the new value is reflected in the … Continue reading “Ref Parameters vs. Out Parameters in C#”

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 that nullable types solve See how to declare a nullable type Learn how to use … Continue reading “Lesson 23: Working with Nullable Types”

Lesson 22: Topics on C# Type

Throughout this tutorial, you’ve seen many different types, including those that are part of C# and custom designed types. If you’ve taken the samples and worked on them yourself, extending and writing your own programs, you are likely to have experienced errors associated with type. For example, you can’t assign a double to an int … Continue reading “Lesson 22: Topics on C# Type”