VS 2015 Note
VS 2015 Note
Nullable Type declaration
Dim variableName As Nullable(Of type) [= expression]
Dim variableName? As type [= expression]
Dim variableName As type? [= expression]
Examples
Dim quantity As Nullable(Of Integer)
quantity = 0
quantity = 20
quantity = Nothing
Dim salesTotal? As a Decimal
Dim isValid As Boolean
Dim paymentTerms As Nullable(Of Terms)
' Dim message As Nullable(Of String) ' not allowed
2 properties for working with Nullable types
HasValue
Value
Nullable Type declaration
Dim variableName As Nullable(Of type) [= expression]
Dim variableName? As type [= expression]
Dim variableName As type? [= expression]
Examples
Dim quantity As Nullable(Of Integer)
quantity = 0
quantity = 20
quantity = Nothing
Dim salesTotal? As a Decimal
Dim isValid As Boolean
Dim paymentTerms As Nullable(Of Terms)
' Dim message As Nullable(Of String) ' not allowed
2 properties for working with Nullable types
HasValue
Value
Comments
Post a Comment