I have 2 functions, one that gets a name and the other that is being set up to Delete from the list of name. There are no compliation errors, but my DeleteName doesn't display anything. Probally a simple fix, what did I overlook?
public static List<string> GetName(List<string> aString)
{
aString = new List<string>();
localList.Add("cat");
localList.Add("apple");
localList.Add("bass");
localList.Add("dog");
return aString;
}
public static List<string> DeleteName(List<string> aString)
{
aString = new List<string>();
GetName(aString);
foreach (string x in aString)
{
Console.WriteLine(x);
}
return aString;
}