Hello,
I think there is a bug in the Declare property behaviour. This is the situation:
CodePublic Interface IAfdrukStrategy
ReadOnly Property MustIncludeFullHeader As Boolean
End Interface
Public Class AfdrukStrategy
Implements IAfdrukStrategy ReadOnly Property MustIncludeFullHeader As Boolean Implements IAfdrukStrategy.MustIncludeFullHeader
Get
Return True
End Get
End Property
End Class
I have a function somewhere else with a parameter named stratetgy of type IAfdrukStrategy
Now from that function I want to add an extra property on the IAfdrukStrategy, called MustIncludeTotalen
CodeSo I press Ctrl+` on strategy.MustIncludeTotalen and select the "Declare property (auto implemented)".
Then I can select the location where I want to put the declaration into the IAfdrukStrategy.
The location is correct, so I hit enter. The result now is:
CodePublic Interface IAfdrukStrategy
ReadOnly Property MustIncludeFullHeader As BooleanEnd Interface
Public Class AfdrukStrategy
Implements IAfdrukStrategy ReadOnly Property MustIncludeFullHeader As Boolean Implements IAfdrukStrategy.MustIncludeFullHeader
Get
Return True
End Get
End Property ReadOnly Property MustIncludeTotalen As Boolean Implements IAfdrukStrategy.MustIncludeTotalen
End Class
Code So the interface is messed up (note the BooleanEnd) and the declaration of the added property is missing.
It is added to the class that implements it.
Thanks,
Jaap.
Hi Jaap,
Thank you for pointing out this issue and providing the code sample. I have reproduced the described behavior of the 'Declare Property' refactoring. We are working on it and will inform you of our progress.