Current filter:
                                You should refresh the page.
                                  • Consider the following code:

                                    [C#]
                                    using System; namespace CodeRushIssue { class Program { private static int? Foo; static void Main( string[] args ) { var bar = Foo.HasValue ? DoSomething( Foo.Value ) : "baz"; } private static string DoSomething( int value ) { throw new NotImplementedException(); } } }

                                    Code Rush suggests to refactor to

                                    [C#]
                                    using System; namespace CodeRushIssue { class Program { private static int? Foo; static void Main( string[] args ) { var bar = DoSomething( Foo.Value ) ?? "baz"; } private static string DoSomething( int value ) { throw new NotImplementedException(); } } }

                                    but the new code is not equivalent and throws an exception when Foo is null.

                                • Pavel A (DevExpress) 12.22.2016

                                  Hello Dominic,

                                  Thank you for pointing out this issue and providing a code sample.
                                  I have reproduced this issue, and we will fix this behavior in future releases.
                                  We will notify you as soon as we have any results.

                                1 Solution

                                Creation Date Importance Sort by