This would be the null forgiving operator.
It tells the compiler “this isn’t null, trust me”, so it does not issue a warning for a possible null reference.
In this particular case it tells the compiler that Entity
isn’t null.
More Related Contents:
- What is the difference between Nullable.HasValue or Nullable != null?
- How to set enum to null
- Nullable reference types: How to specify “T?” type without constraining to class or struct
- Why does .ToString() on a null string cause a null error, when .ToString() works fine on a nullable int with null value?
- Nullable types and the ternary operator: why is `? 10 : null` forbidden? [duplicate]
- What is the difference between null and System.DBNull.Value?
- DateTime “null” value
- Nullable type is not a nullable type?
- C# elegant way to check if a property’s property is null
- C#: Passing null to overloaded method – which method is called?
- How do I handle null or optional DLL struct parameters
- Compare nullable types in Linq to Sql
- Why does Visual Studio Type a Newly Minted Array as Nullable?
- Easier way of writing null or empty?
- Linq query with nullable sum
- Where in memory are nullable types stored?
- Check inside method whether some optional argument was passed
- What are Range and Index types in C# 8?
- Best way to check for nullable bool in a condition expression (if …) [closed]
- DateTime “null” / uninitialized value?
- Calling C# interface default method from implementing class
- Default implementation in interface is not seen by the compiler?
- Type result with conditional operator in C#
- Are nullable types reference types?
- What is the default value of the nullable type “int?” (including question mark)?
- Why does null need an explicit type cast here? [duplicate]
- What’s the difference between ‘int?’ and ‘int’ in C#?
- When should we use default interface method in C#?
- Why doesn’t the conditional operator correctly allow the use of “null” for assignment to nullable types? [duplicate]
- how are nullable types implemented under the hood in .net?