Like a class, Interface can have methods, properties, events, and indexers as members. But the interfaces only contain the membership statement. The implementation of the interface members is given by the class that implicitly or explicitly implements the interface.
interface <name>
{
// declaration
}
interface Result
{
void Show();
}
class newclass : Result
{
public void Show()
{
Console.WriteLine("Hello word");
}
public static void Main(String[] args)
{
newclass newclass = new newclass();
newclass.Show();
}
}
Hello word