public void PrintClients() { ClientsNodo PrClients = Head02; while (PrClients != null) { Console.WriteLine($"Nombre Clients: {PrClients.Clients.Name} -> Age Clients: {PrClients.Clients.Age} -> Gender Clients: {PrClients.Clients.Gender}"); PrClients = PrClients.Next; } }
public void InsertarClients(Clients newclients, Clients after) { ClientsNodo tmp = Head02; while (tmp != null && tmp.Clients != after) { tmp = tmp.Next; } ClientsNodo newnodoC = new ClientsNodo(); newnodoC.Clients = newclients; newnodoC.Next = tmp.Next; tmp.Next = newnodoC; }
public void AddClients(Clients clientsToAdd) { ClientsNodo newclientsNodo = new ClientsNodo(); newclientsNodo.Clients = clientsToAdd; if (Head02 == null) { Head02 = newclientsNodo; } else { ClientsNodo last = Head02; while (last.Next != null) { last = last.Next; } last.Next = newclientsNodo; } }