Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 88613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:35:14+00:00 2026-05-10T22:35:14+00:00

I need an equivalent to c++’s std::multimap<K, V, Comp, Alloc> in C-sharp. Does it

  • 0

I need an equivalent to c++’s std::multimap<K, V, Comp, Alloc> in C-sharp. Does it exist in the standard library?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T22:35:15+00:00Added an answer on May 10, 2026 at 10:35 pm

    Because it’s almost christmas 🙂

    ////////////////////////////////////////////////////////////////////// // Algorithmia is (c) 2008 Solutions Design. All rights reserved. // http://www.sd.nl ////////////////////////////////////////////////////////////////////// // COPYRIGHTS: // Copyright (c) 2008 Solutions Design. All rights reserved. //  // The Algorithmia library sourcecode and its accompanying tools, tests and support code // are released under the following license: (BSD2) // ---------------------------------------------------------------------- // Redistribution and use in source and binary forms, with or without modification,  // are permitted provided that the following conditions are met:  // // 1) Redistributions of source code must retain the above copyright notice, this list of  //    conditions and the following disclaimer.  // 2) Redistributions in binary form must reproduce the above copyright notice, this list of  //    conditions and the following disclaimer in the documentation and/or other materials  //    provided with the distribution.  //  // THIS SOFTWARE IS PROVIDED BY SOLUTIONS DESIGN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A  // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOLUTIONS DESIGN OR CONTRIBUTORS BE LIABLE FOR  // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT  // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR  // BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,  // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE  // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  // // The views and conclusions contained in the software and documentation are those of the authors  // and should not be interpreted as representing official policies, either expressed or implied,  // of Solutions Design.  // ////////////////////////////////////////////////////////////////////// // Contributers to the code: //      - Frans  Bouma [FB] ////////////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; using System.Linq; using System.Text; using SD.Tools.Algorithmia.UtilityClasses;  namespace SD.Tools.Algorithmia.GeneralDataStructures {     /// <summary>     /// Extension to the normal Dictionary. This class can store more than one value for every key. It keeps a HashSet for every Key value.     /// Calling Add with the same Key and multiple values will store each value under the same Key in the Dictionary. Obtaining the values     /// for a Key will return the HashSet with the Values of the Key.      /// </summary>     /// <typeparam name='TKey'>The type of the key.</typeparam>     /// <typeparam name='TValue'>The type of the value.</typeparam>     public class MultiValueDictionary<TKey, TValue> : Dictionary<TKey, HashSet<TValue>>     {         /// <summary>         /// Initializes a new instance of the <see cref='MultiValueDictionary&lt;TKey, TValue&gt;'/> class.         /// </summary>         public MultiValueDictionary()             : base()         {         }           /// <summary>         /// Adds the specified value under the specified key         /// </summary>         /// <param name='key'>The key.</param>         /// <param name='value'>The value.</param>         public void Add(TKey key, TValue value)         {             ArgumentVerifier.CantBeNull(key, 'key');              HashSet<TValue> container = null;             if(!this.TryGetValue(key, out container))             {                 container = new HashSet<TValue>();                 base.Add(key, container);             }             container.Add(value);         }           /// <summary>         /// Determines whether this dictionary contains the specified value for the specified key          /// </summary>         /// <param name='key'>The key.</param>         /// <param name='value'>The value.</param>         /// <returns>true if the value is stored for the specified key in this dictionary, false otherwise</returns>         public bool ContainsValue(TKey key, TValue value)         {             ArgumentVerifier.CantBeNull(key, 'key');             bool toReturn = false;             HashSet<TValue> values = null;             if(this.TryGetValue(key, out values))             {                 toReturn = values.Contains(value);             }             return toReturn;         }           /// <summary>         /// Removes the specified value for the specified key. It will leave the key in the dictionary.         /// </summary>         /// <param name='key'>The key.</param>         /// <param name='value'>The value.</param>         public void Remove(TKey key, TValue value)         {             ArgumentVerifier.CantBeNull(key, 'key');              HashSet<TValue> container = null;             if(this.TryGetValue(key, out container))             {                 container.Remove(value);                 if(container.Count <= 0)                 {                     this.Remove(key);                 }             }         }           /// <summary>         /// Merges the specified multivaluedictionary into this instance.         /// </summary>         /// <param name='toMergeWith'>To merge with.</param>         public void Merge(MultiValueDictionary<TKey, TValue> toMergeWith)         {              if(toMergeWith==null)             {                 return;             }              foreach(KeyValuePair<TKey, HashSet<TValue>> pair in toMergeWith)             {                 foreach(TValue value in pair.Value)                 {                     this.Add(pair.Key, value);                 }             }         }           /// <summary>         /// Gets the values for the key specified. This method is useful if you want to avoid an exception for key value retrieval and you can't use TryGetValue         /// (e.g. in lambdas)         /// </summary>         /// <param name='key'>The key.</param>         /// <param name='returnEmptySet'>if set to true and the key isn't found, an empty hashset is returned, otherwise, if the key isn't found, null is returned</param>         /// <returns>         /// This method will return null (or an empty set if returnEmptySet is true) if the key wasn't found, or         /// the values if key was found.         /// </returns>         public HashSet<TValue> GetValues(TKey key, bool returnEmptySet)         {             HashSet<TValue> toReturn = null;             if(!base.TryGetValue(key, out toReturn) && returnEmptySet)             {                 toReturn = new HashSet<TValue>();             }             return toReturn;         }     } } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I find when describing something to clients use a metaphor… May 11, 2026 at 11:24 am
  • added an answer TFS uses windows authentication, so it's as secure as your… May 11, 2026 at 11:24 am
  • added an answer Subclassing is the best option. I would subclass your main… May 11, 2026 at 11:24 am

Related Questions

I need an equivalent to c++'s std::multimap<K, V, Comp, Alloc> in C-sharp. Does it
I need an encoder that can convert mp3 files to he-aac (aka aac+). So
I need an associative container that makes me index a certain object through a
I need an easy way to take a tar file and convert it into
I need an easy way to allow users to upload multiple files at once
I need an algorithm to determine if a sentence, paragraph or article is negative
I need an up to date and easy to use .net wrapper for google
I need an OpenSource API in Java, which can encode *.wav and *.au formats
I need an idea for an efficient index/search algorithm, and/or data structure, for determining
I need an accurate timer to interface a Windows application to a piece of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.