LINQ_Object_Count1
Objectives: Count Collection Operation
  • Count :: query returns

    var elist = getEmp();
    IEnumerable<ObjectFacotry> edb =
    from e in elist where e.job.Contains("CLERK") select e ;
    int n1 = edb.Count();
  • Count:: Function Returns
    List<ObjectFacotry> empdb = getEmp();
    int n2 = getEmp().Count();
Code : LINQ_Object_Count1.txt

Result output: