Current filter:
                                You should refresh the page.
                                  • Following example shows CRR0027 on line 8 ("result = splitted(0).ToUpper") although NullReferenceException is never thrown:

                                    [VB.NET]
                                    Public Module Module1 Function Foo(text As String) As String Dim result As String = text If text IsNot Nothing Then Dim splitted As String() = text.Split({" "c}, StringComparison.Ordinal) result = splitted(0).ToUpper End If Return result End Function 'Examples: ' Foo("Hello World!") => "HELLO" ' Foo("Morning!") => "MORNING!" ' Foo("") => "" ' Foo(Nothing) => Nothing End Module
                                • Alex X (DevExpress) 11.17.2017

                                  Hi Robert,

                                  Thank you for trying the Possible NullReference diagnostic beta feature. I have reproduced this false positive report. You will be notified when we prepare a fix.

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed: