I am writing a Linq query just for learning.
var result = Process.GetProcesses()
.Where(p => p.WorkingSet64 > 20 * 1024 * 1024)
.OrderByDescending(p => p.WorkingSet64)
.Select(p => new {p.Id,p.ProcessName,p.WorkingSet64 });
I want to iterate in to result
foreach(process in result) //error-type or namespace process could not be found.
{
Console.WriteLine(Process.ProcessName);
}
I want to iterate in to result and print each process name on the console.
What I am doing wrong.