About 48 results
Open links in new tab
  1. C# Null Coalescing (??) operator - Medium

    Jul 19, 2024 · The null coalescing operator (??) in C# is a convenient way to handle null values in expressions. It checks whether its left-hand operand is null and, if so, evaluates and returns the right …

  2. docs/docs/csharp/language-reference/operators/null-coalescing-operator

    The `??` and `??=` operators are the C# null-coalescing operators. They return the value of the left-hand operand if it isn't null. Otherwise, they return the value of the right-hand operand. The null-coalescing …

  3. Null coalescing operator - Wikipedia

    It is most commonly written as x ?? y, but varies across programming languages. While its behavior differs between implementations, the null coalescing operator generally returns the result of its left …

  4. Understanding ??, ?., and ??= in .NET — Null Handling Simplified for C# ...

    May 20, 2025 · Fortunately, with modern C# (especially from C# 6 onwards), Microsoft has introduced powerful null-handling operators to help us write cleaner, safer, and more expressive code.

  5. How to handle null values in C# - InfoWorld

    Jul 20, 2023 · In this article, we’ll examine various ways to deal with null values in C#. To work with the code examples provided below, you should have Visual Studio 2022 installed in your system.

  6. Nullish Coalescing Operator (??) - HackerNoon

    Jan 23, 2022 · Nullish coalescing vs or operator explained and why it will help keep out bugs out of your code.

  7. Generating Default Values for Nulls with Coalescing Operator

    In Visual Basic, the coalesce operator is If (), in C#, it’s ??. This example checks to see if a nullable integer value is, in fact, set to null and, if it's not, returns datatypes's minimum value:

  8. The Double Question mark in C# — ?? | Geek Culture - Medium

    Jul 12, 2022 · The double question mark or null-coalescing operator in C#: how to use it. Assignment, chains, associativity.

  9. docs/docs/csharp/language-reference/operators/null-coalescing-operator

    The operators `??` and `??=` can't be overloaded. For more information about the `??` operator, see [The null coalescing operator] (~/_csharpstandard/standard/expressions.md#1215-the-null …

  10. C# tips: null-coalescing operator 1. Understand the Operator

    C# tips: null-coalescing operator 1. Understand the Operator: The null-coalescing operator '??' is used to provide a default value for nullable types or reference types.