I was just curious as to whether Visual Studio has a package that will generate default methods for a class that is either extending a super class with abstract methods or an interface with said methods (similar to Eclipse with Java)?
i.e. if you had
C#
namespaceMath2 {
interfaceNumber {
T add(T args);
T subtract(T args);
T multiply(T args);
T divide(T args);
}
}
and you create a class which implements the interface i.e.
Code
namespace Math2 {
class ComplexNumber : Number {
}
}
Hi, You can use the "Implement Interface" context menu. Just right click on inherited interface and you will get this menu. This menu will generate the whole method body. Please look the attached screen shot.
Jaish MathewsRank #225 · 11K reputationPosted Jul 17, 2010, 9:00 AM EDT
You can use the "Implement Interface" context menu. Just right click on inherited interface and you will get this menu. This menu will generate the whole method body. Please look the attached screen shot.