The Null-Conditional Operator: A First Look
Visual Basic 2015 introduces a new important language feature: the null-conditional operator. It gives you a more elegant and efficient way to check for null values (Nothing
) before using an object. Due to its importance and to the different types of objects you can use it with, the null-conditional operator is discussed in many chapters of this book. This chapter provides an introduction to this operator. Other examples and explanations will be provided after you get the knowledge you need about specific topics, such as nullable types, to understand how you can use the new operator with value types. With plain types, it is represented by the ?.
symbols. To get a taste of how it works, consider the ...
Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.