Answers for "linq c# dictionary foreach"

C#
1

c# foreach dictionary

foreach(KeyValuePair<string, string> entry in myDictionary)
{
    // do something with entry.Value or entry.Key
}
Posted by: Guest on March-03-2021
3

linq foreach c#

sequence.Where(x => x.Name.ToString().Equals("Apple"))
    .ToList()
    .ForEach( x =>
     {
       if(someCondition)
       {
         // Do some stuff here.
       }  
     });
Posted by: Guest on August-27-2020

C# Answers by Framework

Browse Popular Code Answers by Language