+ 1
can a method take parameters in interface?
3 ответов
+ 4
Any method written in an interface will have just declaration part of it..no body..And it can have all the parts that a normal method declaration has..that is return type, method name and parameters. The SPECIFIC thing about the methods in an interface is that they are always public and abstract. The method declaration should end with semicolon not either curly braces. .
+ 3
yes methods in interface has signature(name and parameters) but interface not specify any implementation for these methods.
0
I want to add that interface in c# 0.8 and onward can also have method implementation.