using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main(string[] args)
{
Dictionary<string, int> dictionary = new Dictionary<string, int>()
{
{ "Label1", 100 },
{ "Label2", 200 },
{ "Label3", 300 }
};
string GetLabelByValue(Dictionary<string, int> dict, int value)
{
return dict.FirstOrDefault(x => x.Value == value).Key;
}
int targetValue = 200;
string label = GetLabelByValue(dictionary, targetValue);
Console.WriteLine($"Label for value {targetValue}: {label}");
}
}