Background In this post we will cover the Null-Conditional Operator ( ?. ). Series Here are other posts that covers .Net Operators:- .Net:- Operator – The null-coalescing operator ?? Date Published:- 2022-November-8th Link Code Code - HelloWorld Code - HelloWorld Outline Get String Length Print String and String Length Output Output - Text … Continue reading .Net:- Operator – The null-conditional operator ?.
operator ( Microsoft – .Net )
.Net:- Operator – The null-coalescing operator ??
Background .Net Console.WriteLine is null safe. But, then some functions may not be. To protect yourself in the case of nullable variables, please consider the use of the ?? operator. Code Output Image Textual References Microsoft Learn > .NET > C# guide > Language reference > Operators and expressions ?? and ??= operators … Continue reading .Net:- Operator – The null-coalescing operator ??
You must be logged in to post a comment.