Null Conditional Operators | C#

Pubblicato il: 14 gennaio 2022
sul canale di: SharpDev
240
5

You can follow the playlist here:    • C# Using Directives  

Introduction:
Available as from C# 6.
2 variants that provides member or element access iff operand is not null, otherwise null is returned.
?. : applies a member access
?[] : applies an element access

Null conditional operators are short circuiting.
If one operation in a chain of conditional member or element access operations returns null, the rest of the chain doesn't execute. 
E.g. A?.B?[C]
B is not evaluated if A is null.
C is not evaluated if either A or B is null.


In questa pagina del sito puoi guardare il video online Null Conditional Operators | C# della durata di online in buona qualità , che l'utente ha caricato SharpDev 14 gennaio 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 240 volte e gli è piaciuto 5 spettatori. Buona visione!