I am trying to pass a varying amount of strings into a List and than manipulate these strings. I am attempting something like this but I think I am doing it wrong:
public static void ActivateStateFilter(List<string> lStatelist)
{
for (int index = 0; index < lStatelist.Count; index++) // Loop with for.
{
lStatelist.Add(lStatelist[index]); //Add strings to the list
}
}
This is how I attempt to pass values:
ActivateStateFilter(new List<string> {"Active", "Inactive"});
Thanks in advance!