Current filter:
                                You should refresh the page.
                                  • Following example code is correct and does not produce any NullReferenceException although it's mentioned for line 16 "Return text.Bar":

                                    [VB.NET]
                                    Public Module Module1 <System.Runtime.CompilerServices.Extension> Function Bar(text As String) As String Dim result As String = text If text IsNot Nothing Then result = text.Substring(0, 3) End If Return result End Function Function Foo(text As String) As String 'do something else Return text.Bar End Function 'Examples: 'Foo("Hello") => "Hel" 'Foo(Nothing) => Nothing End Module
                                • Alex X (DevExpress) 11.17.2017

                                  Hi Robert,

                                  Thank you for catching this false positive report of the Possible NullReference diagnostics. I managed to reproduce it on my side. Give us some time to prepare a fix.

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed: