创建一个实现内部接口类型 [英] Create type that implements internal interface

查看:133
本文介绍了创建一个实现内部接口类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有大会,宣布内部接口 IInternalInterface 。我要$ C $该组件的C无连接,我不能改变它。 如何创建我自己的实现 IInternalInterface

为什么我需要这样的:集包含的类的 IInternalInterface 执行者名单,我的目标是增加我自己的实现有

解决方案
  

我如何创建我自己的实现IInternalInterface的?

答案很简单:你不能。如果程序集的作者决定,以纪念这个接口与内部则表示,他们不希望从其他程序集code使用这个接口。

Suppose I have assembly that declares internal interface IInternalInterface. I have no access to code of this assembly and I can't change it. How can I create my own implementation of IInternalInterface?

Why I need this: the assembly contains the class with list of IInternalInterface implementers and my goal is to add my own implementation there.

解决方案

How can I to create my own implementation of IInternalInterface?

Simple answer: you can't. If the authors of the assembly decided to mark this interface with internal it means that they didn't want code from other assemblies to use this interface.

这篇关于创建一个实现内部接口类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆