问题
.NET comes with some built in collections (stack, queue, dictionary, list etc.) but others common collections, like priority queues, are missing. There are many third party collection libraries on NuGet but I was wondering if there is an official Microsoft one (like the BCL immutable collections now called System.Collections.Immutable
) library with things like (mutable) priorities queues?
EDIT: Important clarification (comment by @rmunn):
This question is not asking to recommend a library for X, it is asking a factual question, "Are there any official Microsoft libraries for X?"
回答1:
No, not yet, anyway. Here is everything Microsoft offers at the moment.
EDIT: Microsoft has written (and shared online) 2 internal PriorityQueue classes within the .NET Framework. You could use their code.
See also: Priority queue in .Net
EDIT 2: You could also keep your eye on this space in case Microsoft ever publishes the type of NuGet package your question suggested. But at the moment, no dice.
回答2:
I'm not sure if you already looked at it, but the System.Collections.Specialized
namespace contains quite some hidden gems.
Also the System.Linq
namespace can be worth a look.
来源:https://stackoverflow.com/questions/42562307/microsoft-collections-for-net