如何在 C++/CLR 中扩展 C# 接口?

发布于 2024-09-29 08:42:37 字数 143 浏览 0 评论 0原文

我对这个真的很沮丧。我正在尝试在 C++/CLR 中扩展 C# 创建的接口。该接口有一个方法,并且我已在类中声明了它,但编译器不断告诉我,我仍然必须提供该接口方法的实现。我还能做什么?我错过了什么!?

有谁有关于如何在 CLR 中扩展 C# 接口的示例吗?

I'm really frustrated with this one. I'm trying to extend a C# created interface in C++/CLR. The interface has one method and I've declared it in my class, but the compiler keeps telling me that I must still provide an implementation for the interface method. What more can I do? What am I missing!?

Does anyone have any examples of how to extend a C# interface in CLR?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

奈何桥上唱咆哮 2024-10-06 08:42:37

我想通了!我需要使元素的实现变得虚拟。我希望这可以帮助其他人解决同样的问题。

I figured it out! I needed to make the implementation of elements virtual. I hope this helps other people with this same issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文