public void GetUsers() { List <Users> users = new List <Users>(); try { users = userAPI.GetUsers(); } catch (Exception ex) { Console.WriteLine(ex.Message + "Problem getting users in interface"); return; } Console.WriteLine(); Console.WriteLine("The available users are: "); foreach (Users user in users) { if (user.UserId != authService.userId) { Console.WriteLine(user); } else { } } }