/ Published in: C#
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
IQueryable<Person> GetManagersWithName (IQueryable<Person> people, string name)
{
return from p in people
where p.Name == name && // implicit closure over 'name'
p.PersonType == PersonType.Manager
select p;
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                