using System;
using System.Linq;
namespace ConsoleApplication_C_Sharp
{
class Program
{
static void Main(string[] args)
{
string[] arr = new string[] { "c#",
"java",
"c++"
};
var dictionary = arr.ToDictionary(item => item, item => true);
foreach (var keyval in dictionary)
{
Console.WriteLine("Key = {0} - Value = {1}", keyval.Key, keyval.Value);
}
}
}
}
/*
run:
Key = c# - Value = True
Key = java - Value = True
Key = c++ - Value = True
*/