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

                                    [VB.NET]
                                    Public Class Class1 Public Function Foo1() As Integer Dim value As String = "Value" Dim other As Object = DirectCast(value, Object) 'CRR0027 (false positive) Return other.GetHashCode End Function <NotNull> Public Function Value() As String Return "Value" End Function Public Function Foo2() As Integer Dim other As Object = DirectCast(Value(), Object) 'CRR0027 (false positive) Return other.GetHashCode End Function Public Function Bar() As Integer Dim value As String = Nothing Dim other As Object = DirectCast(value, Object) 'CRR0027 (correct!) Return other.GetHashCode End Function End Class <AttributeUsage(AttributeTargets.All)> Public NotInheritable Class NotNullAttribute Inherits Attribute End Class
                                • George K (DevExpress) 10.30.2018

                                  Hi Robert,
                                  Thanks for the code snippet.
                                  I have reproduced this issue locally. Please give us some time to research the issue in detail.

                                1 Solution

                                Creation Date Importance Sort by