그것은인터페이스 유형의 일반 메소드를 생성 할 수 있습니까?
내가(T)Activator.CreateInstance();
와 인터페이스를 생성해야
public static string MyMethod<IMyTypeOfInterface>(object dataToPassToInterface)
{
// an instance of IMyTypeOfInterface knows how to handle
// the data that is passed in
}
같은 서명으로 일반적인 방법을 만들 수 있습니까?