Answers for "c# getting value from dictionary with key"

C#
-1

get key in dictionary c#

public static string GetKeyFromValue(string valueVar)
{
   foreach (string keyVar in dictionaryVar.Keys) 
   { 
      if (dictionaryVar[keyVar] == valueVar)
      {
         return keyVar;
      }
   }
   return null;
}
Posted by: Guest on November-05-2021

Code answers related to "c# getting value from dictionary with key"

C# Answers by Framework

Browse Popular Code Answers by Language