Current filter:
                                You should refresh the page.
                                  • Please see following examples:

                                    [VB.NET]
                                    Public Class Class1 Public Shared Function WithEmpty1(text As String) As Integer If Not String.IsNullOrEmpty(text) Then 'CRR0027 Return text.Length End If Return 0 End Function Public Shared Function WithEmpty2(text As String) As Integer If String.IsNullOrEmpty(text) Then Return 0 'No CRR0027 Return text.Length End Function Public Shared Function WithWhiteSpace1(text As String) As Integer If Not String.IsNullOrWhiteSpace(text) Then 'CRR0027 Return text.Length End If Return 0 End Function Public Shared Function WithWhiteSpace2(text As String) As Integer If String.IsNullOrWhiteSpace(text) Then Return 0 'CRR0027 Return text.Length End Function End Class
                                • Alex Z (DevExpress) 04.18.2018

                                  Robert,

                                  Thank you for the report. I agree with you that IsNullOrEmpty and IsNullOrWhiteSpace can be taken into account when evaluating possible null reference diagnostics.

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed: