title: C# print list of items for object with 3 properties
body: <p>I am a newbie for C# </p>
  
  <p>Current code</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace Basic1
  {
      class Program
      {
          static void Main(string[] args)
          {
              List&lt;Employee&gt; empList = new List&lt;Employee&gt;()
              {
                  new Employee { FName = "Bill", LName = "Lucas", Id = 101 },
                  new Employee { FName = "Steve", LName = "Lanes", Id = 102 },
                  new Employee { FName = "Jeff", LName = "Clark", Id = 103 },
                  new Employee { FName = "Joe", LName = "Thomas", Id = 104 },
                  new Employee { FName = "Joe", LName = "Wang", Id = 105 },
                  new Employee { FName = "Steven", LName = "Holmes", Id = 106 },
                  new Employee { FName = "Mark", LName = "Lark", Id = 107 },
                  new Employee { FName = "Larry", LName = "Good", Id = 108 },
                  new Employee { FName = "Tim", LName = "Whiles", Id = 109 },
                  new Employee { FName = "Jerry", LName = "Lee", Id = 110 }
              };
              List&lt;Employee&gt; empListJoe = new List&lt;Employee&gt;();
              foreach (Employee employee in empList)
              {
                  if (employee.FName == "Joe")
                  {
                      empListJoe.Add(employee);
                  }
              }
              Console.WriteLine(empListJoe);
              Console.ReadLine();
          }
      }
      public class Employee
      {
          public string FName { get; set; }
          public string LName { get; set; }
          public int Id { get; set; }
      }
  }
  </code></pre>
  
  <p>So I created a new list with all employees with the first name <code>"Joe"</code>.<br>
  However, it seems I can't print the list of items properly, instead I get an output like this:</p>
  
  <blockquote>
    <p>'System.Collections.Generic.List`1[Basic1.Employee]</p>
  </blockquote>
  
  <p>or merely two lines of</p>
  
  <blockquote>
    <p>Basic1.Employee.</p>
  </blockquote>
  
  <p>I have tried each of this, but stil get an generic output than the actual list of items.</p>
  
  <pre><code>Console.WriteLine(empListJoe);
  
  Console.WriteLine(String.Join(" \n", empListJoe));
  
  empListJoe.ForEach(Console.WriteLine);
  
  Console.WriteLine(empListJoe.ToString());
  </code></pre>
  
  <p>Btw, this one works:</p>
  
  <pre><code>Console.WriteLine($"Employee Name: {employee.FName} {employee.LName}, Employee ID: {employee.Id}");
  </code></pre>
  
  <p>But I am trying to print from the new list.
  I guess I am missing something basic.</p>
  
  <p>Thanks.</p>