I\'m having trouble implementing the delete function, any help would be appreciated. I have a list called memberlist that stores the persons name and number. I have everything w
If you change Person[] to List as suggested by @Wiktor Zychla, this code should work well:
public static List ML = new List();
public static void DeleteMember(string name)
{
var deleteMe = ML.Find(p => p.Name == name);
if (deleteMe == null)
{
Console.WriteLine(name + " had not been added before.");
}
else
{
ML.Remove(deleteMe);
}
}