First get the index of "James", add element at that position and increment all other indexes by 1.
string[] Add(string[] array, string newValue){
int newLength = array.Length + 1;
string[] result = new string[newLength];
result[newLength -1] = newValue;
return result;
}
string[] RemoveAt(string[] array, int index){
int newLength = array.Length - 1;
if(newLength < 1)
{
return array;
}
string[] result = new string[newLength];
int newCounter = 0;
for(int i = 0; i < array.Length; i++)
{
if(i == index)
{
continue;
}
result[newCounter] = array[i];
newCounter++;
}
result result;
}
reference : stackoverflow[^]
-KR