Current filter:
                                You should refresh the page.
                                  • Repro steps:
                                    0. Set your Local declaration style in Programming Style to Use implicit.

                                    1. Create a new C# Console App (.NET Framework) in Visual Studio 2017.  (We'll call it UsingImplicit.)
                                    2. Replace the code in the Program class with the following:
                                    using System; namespace UsingImplicit { class Program { class Whatever : IDisposable { public void Dispose() => throw new NotImplementedException(); } static void Main(string[] args) { new Whatever(); } } }
                                    3. Put your cursor on Whatever in the Main method.
                                    4. Activate the Introduce Using Statement refactoring.

                                    The code is refactored to:

                                    using (var whatever = new Whatever()) { }

                                    The code is refactored to:

                                    using (Whatever whatever = new Whatever()) { }
                                • Dmitry O (DevExpress) 01.17.2018

                                  Thank you for the code snippets. I have reproduced the problem on my side. I am absolutely agree that the "Introduce Using Statement" feature should correctly process the "Local declaration style" options. We will do our best to fix the problem as soon as possible. Once we resolve it, we will let you know in the context of this ticket.

                                1 Solution

                                Creation Date Importance Sort by