gpt4 book ai didi

c# - c#.net 和 vb.net 中同一 dll 的属性差异

转载 作者:行者123 更新时间:2023-11-30 14:33:05 26 4
gpt4 key购买 nike

我正在为我的项目添加一个 dll。我的项目在 vb.net 中,dll 是用 c#.net 编写的。当我将其添加到 vb.net 项目时,可用的属性与将相同的 dll 添加到 c# 项目时可用的属性不同(数量较少)。

Object Browser view when added to a VB.Net Project enter image description here

Object Browser view when added to a c# project Object Browser view when added to a c# project

如果您在 c# View 中看到,您可以访问诸如“hits”和“facets”之类的属性,而这些属性在 vb.net 中是无法访问的。

谁能帮我理解这个问题。

最佳答案

VB.NET 和 C# 之间存在差异。确保使用程序集属性编译 C# dll CLSCompliant设置为 true,以便您的编译器可以确定您的所有公开是否与其他 .NET 语言兼容。

关于c# - c#.net 和 vb.net 中同一 dll 的属性差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17147108/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com