[1169] Create ctors spans region

Given the classes:


   public class Base
   {
      public Base() { }
      public Base(int i) { this.i = i; }
      private int i;
   }

   public class Derived : Base
   {
==>cursor
      #region Methods
      public void Do() { }
      #endregion
   }



 


and with the insertion point at the location shown, hit Alt + Ins, create constructors and select both the constructors from Base.  The result is:


   public class Derived : Base
   {
      public Derived()
      {
      }

      #region Methods

      public Derived(int i) : base(i)
      {
      }

      public void Do() { }
      #endregion
   }



 


Note that one of the constructors has been created inside the region below where the insertion point was.  This is confusing if the region was collapsed.

Cheers

Sean

0

Please sign in to leave a comment.