8
Shouts

How to find an element in c# Generic List

published 894 days, 1 hour, 40 minutes ago posted by kcherupakcherupa 896 days, 3 hours, 58 minutes ago
Friday, December 11, 2009 7:31:15 AM GMT Wednesday, December 09, 2009 5:13:43 AM GMT

The following sample code demonstrates you how to find a matching element in the object list.

Let's say we have an object called Person with public properties PersonID, Name, Age, Gender as defined below.

using System.Collections.Generic.List;

public class Person { public int PersonID {get; set;} public string Name {get; set;} public int Age {get; set;} public bool Gender {get; set;} }

class program { public static void Main(string[] args) { // Let's say we have a method de...

category: Agile | clicked: 0 | | source: cherupally.blogspot.com | show counter code
tags: Generics, Find, C#, List, collection, Linq