``
用interface来定义接口
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Security.Cryptography;
namespace ConsoleApp1
{
class InterfaceImplementer: IMInterface
{
static void Main()
{
InterfaceImplementer a = new InterfaceImplementer();
a.MethodToImplement();
Console.ReadKey();
}
public void MethodToImplement(){Console.WriteLine("MethodToImplement() called.");}
}
interface IMInterface
{void MethodToImplement(); //接口成员
}
}