So let's say I have an array like this:
string[] words = new string[3];
words[0] = "welcome";
words[1] = "hello";
words[2] = "hey";
and I want to clone/copy it and will modify it:
string[] new_words = words;
new_words[1] = "hi!";
The problem is that it actually changes the words[1] = "hello";
to words[1] = "hi!";
as well which is not what I wanted to do.
How can I copy/clone an array and modify it without affecting its source? Thank you so much!