IDE - support for use of interfaces

  • Thread starter Thread starter Frank Esser
  • Start date Start date
F

Frank Esser

Hi!

When I want to implement a new class on base of an existing interface I
always have to switch between window of new class and the interface
definition.

Is there an easier way? Any support by IDE?
E.g. a command to add all required methods/properties to the class as soon
as there is a reference to an interface?

Thanks!
 
Frank said:
Hi!

When I want to implement a new class on base of an existing interface I
always have to switch between window of new class and the interface
definition.

Is there an easier way? Any support by IDE?
E.g. a command to add all required methods/properties to the class as soon
as there is a reference to an interface?

Thanks!

That is standard functionality in VS. As soon as I finish typing
the ": IInterface", VS shows a message "press TAB to add methods".

But: that interface should be known to your new class. If your interface
is in a different project, you should have built that and referenced
in the project of the new class. Also you need either a "using"
clause or use a namespace path, so VS has a chance to know what you mean.

If you *change* the interface, you have to change the class by hand
(AFAIK).
 
Hello Frank,

Hans's method works. I also wanted to let you know that JetBrains also makes
a tool called ReSharper [1], which provides a lot of IDE usability enhancements
such as easier interface implementations and overriding.

[1] http://www.jetbrains.com/resharper/
 
Back
Top