I was wondering if there was a way to get Visual Studio to fill in a default Interface Implementation when it's implemented.
This particular client requires the use of VB, please excuse me.
Here's an example:
I have an interface:
Public Interface ISavableReport
Sub SetReport(R As Report)
End Interface
In almost all of the classes which will implement the interface, the SetReport method is the same. Of course, I would never want to be able to define methods in an interface since that would defeat about 2/3 of the reasons for an interface, but is there some way to get Visual Studio to fill in a default implementations?
In VB for example, when I type:
Implements ISavableReport
It will automatically create the property/method/event stubs in the class:
Public function SetReport(R As Report) Implements ISavableReport.SetReport
End Function
I would like it to automatically fill in:
Public function SetReport(R As Report) Implements ISavableReport.SetReport
_localReport = R
End Function
I've never attempted to customize Visual Studio itself, and frankly this feature has a very small domain of use, but For certain projects I've worked on where the majority of the implementing classes were nearly identical (even the local vars) It would help me out instead of having to copy/paste so much.
Just a thought.
Paul