标准 java 类的 .Net 实现

发布于 2024-10-22 03:26:26 字数 250 浏览 5 评论 0原文

有谁知道 .Net 程序集包含与典型 java 类型具有相同功能的类:

例如,以下内容的 .Net 实现(最好是 C#)包含与 java 类所包含的相同方法。

java.util.HashMap

java.util.LinkedList

等...

我知道 java 集合和 .net 集合之间的一些根本区别,例如在枚举期间删除元素的能力,但这并不意味着大多数功能不能在。网。

提前致谢。

Does anyone know of a .Net assembly that contains classes with the same functionality of the typical java types:

For instance, .Net implementations (preferably c#) of the following that contain the same methods that the java classes contain.

java.util.HashMap

java.util.LinkedList

etc...

I know of some fundamental differences between java collections and .net collections, such as the ability to remove elements during enumeration, but that does not mean that most functions cannot be implemented in .net.

Thanks in advance.

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

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

发布评论

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

评论(4

趴在窗边数星星i 2024-10-29 03:26:26

如果您正在寻找与 Java 兼容的 API 接口,您可能需要查看 IKVM

If you are looking for API compatible interfaces with Java, you may want to look into IKVM.

写下不归期 2024-10-29 03:26:26

System.Collections.GenericSystem.Collections 保留您要查找的类型,LinkedListHashTable 分别虽然可能有更好的泛型替代品,例如 Dictionary取决于您的意图。

System.Collections.Generic and System.Collections hold the types you are looking for, LinkedList and HashTable respecitively although there are probably better alternatives with generics such as a Dictionary<TKey, TValue> depending on your intentions.

ぃ双果 2024-10-29 03:26:26

查看 System.CollectionsSystem.Collections.Generic 命名空间,这些包含主集合类。

您可能想要查看的另一个有用工具是 IKVM.NET。该框架允许您使用 .NET 中的 Java API 类,并提供一些用于 Java 和 .NET 之间互操作的机制。

Take a look at the System.Collections or System.Collections.Generic namespaces in .NET, these contain the main collection classes.

Another useful tool you might want to check out is IKVM.NET. This framework allows you to use the Java API classes from .NET, and provides some mechanisms for interoperate between Java and .NET.

情泪▽动烟 2024-10-29 03:26:26

您是否正在寻找完全相同相同的方法?

我的意思是,HashMap 基本上与 Dictionary 相同,而 LinkedList基本上与LinkedList相同。所以就是这样。

我不知道有人制造了精确的克隆,只是因为不清楚它的价值是什么。

Are you looking for exactly the same methods?

I mean, HashMap is basically the same as Dictionary<TKey, TValue>, while LinkedList is basically the same as LinkedList<T>. So there's that.

I don't know that anyone's made exact clones just because it's unclear what the value of that would be.

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