Current filter:
                                You should refresh the page.
                                  • Please see following example (I know it looks stupid. But I have cases with complex classes where that applies.):

                                    [VB.NET]
                                    Public Class Class1 Public Function Foo(value As String) As Integer If If(value?.Length, 0) = 0 Then Return -1 'CRR0027 (false positive) Return value.Length End Function Public Function Bar(value As String) As Integer If value Is Nothing Then Return -1 If value.Length = 0 Then Return -1 'No CRR0027 Return value.Length End Function End Class
                                • Alexander K (DevExpress) 10.01.2018

                                  Hi Robert,

                                  Thank you for providing the code sample. We are working to support this construction with a null-conditional operator in our "Possible System.NullReferenceException" analysis. We will notify you of our progress.

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed: