So I was wondering if there's a way to add a string to a null or empty index in array list. So the thing that I want is that if the array list index is null or empty then I want it to be replaced by another text.
string[] namelist = new string[4] { "dodo", "klee", "diluc", null };
for (int i = 0; i < namelist.Count(); i++)
{
if (namelist[i] == null)
{
*Replace Null Text*
}
else
Console.WriteLine("Taken");
}
Thanks.