-1
IDataContextA를 사용하는 경우 IStoreable 또는 smth와 같은 T에 더 많은 제한을 추가 할 수 있습니다. 하지만 그 한계점 하나만 있다면 여전히 차이가 있습니까?일반 인터페이스 제한 T
public interface IDataContextA
{
IBusinessModel<T> GetModel<T>() where T : IBusinessObject;
}
public interface IDataContextB
{
IBusinessModel<IBusinessObject> GetModel<IBusinessObject>();
}
IBusinessObject, IStoreable,' –
을 'IDataContextB.GetModel()에서'IBusinessObject'는 제한이없는 일반적인 매개 변수입니다. 아마 당신이 의도 한 것이 아닙니다. – Lee
Lee가 맞습니다. 타이 – Olli