Speaking as a total LINQ newbie:
Is there a more "LINQ" ish way to interate over list of integers and fill the dictionary?
The commented code works ... I am just looking for a more LINQ like syntax / solution.
Please provide code in C#....
public IDictionary<int, string> ReturnIntStringCollection(ICollection<int> IntegerCollection)
{
//Dictionary<int, string> DictionaryOfIntsAndStrings = new Dictionary<int, string>();
//foreach (int tempInt in IntegerCollection)
//{
// NumPlusKeyword npkw = new NumPlusKeyword();
// npkw = IntegerIsValid(tempInt);
// if (npkw.NumValid)
// {
// DictionaryOfIntsAndStrings.Add(npkw.Number, npkw.KeyWord);
// }
//}
//return DictionaryOfIntsAndStrings;
}
Open in new window