title: How Add value to Object Property within a List<>
body: <p>Still a beginner so please bare with them me on this. I would like the ability to add a number value to my property after the list distinguishes that there are duplicate values. </p>
  
  <p>For example, two users have inputted into the system that they have the same employee ID of 001, the List allows them both to go in then applies a condition to check the list for any duplicates so in this case there would be. Now this conditional is true, add 1 to that property so the last employee now has employee ID of 002.  </p>
  
  <p>I believe LINQ will more than likely be involved in this process, but not to sure on how to go about this. I understand I will also have to update my List after performing this after to maintain the properties state throughout the program. </p>
  
  <p>Thanks in advance hope everything is clear, question again How to add value to a property within a List&lt;></p>
  
  <p>Code Snippet below. </p>
  
  <pre><code>Employee = new Employee(employeeFirstName, employeeLastName,001); // Hard coded for sake of example. 
  
  EmployeeList.AddEmployee(Employee);
  </code></pre>
  
  <p>EmployeeList Class</p>
  
  <pre><code>public static void AddEmployee(Employee employee)
  {
  
     employees.Add(new Employee(employee.FirstName,employee.LastName,employee.EmployeeID)); 
     employees.Add(new Employee("John", "Jones", 001));    
  
  }
  
  public void employeeIdValidation()
  {
    if (employees.Count() != employees.Select(x =&gt; new {staffId = x.EmployeeID }).Distinct().Count())
    {
       Console.WriteLine("Every Book and Category should be unique");
       // employee ID increments by 1 
       // update List
  
    }
    else
    {
      Console.WriteLine("No duplicate found");
    }
  }
  
  public static List&lt;Employee&gt; GetEmployeeList()
  {
    return employees; // With the updated EmployeeID 
  }
  </code></pre>