Eugenio De Hoyos
Eugenio De Hoyos

Reputation: 1775

.Net implementation of standard java classes

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.

Upvotes: 1

Views: 316

Answers (4)

Nate
Nate

Reputation: 5407

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

Upvotes: 2

Andy White
Andy White

Reputation: 88475

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.

Upvotes: 1

Dan Tao
Dan Tao

Reputation: 128417

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.

Upvotes: 0

Quintin Robinson
Quintin Robinson

Reputation: 82375

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.

Upvotes: 1

Related Questions