There are two kinds of types in the C# type system "value types" and "reference types".
Value types are copied by value. when you copy one, you get an entirely new object.
Reference types are copied by reference. when you copy one, you are actually copying a reference to some storage location.
String is a value type, but you're trying to make it behave like a reference type.
You can create a class with a String property and then use an array of that class:
public class StringWrapper
{
public String Value {get; set;}
}
Then you can use it like this:
public class SomeOtherClass
{
public void SomeMethod()
{
StringWrapper[] array = new StringWrapper[3];
var x = new StringWrapper() { Value="X"; }
var y = new StringWrapper() { Value="y"; }
var z = new StringWrapper() { Value="z"; }
array[0] = x;
array[1] = y;
array[2] = z;
array[0].Value = "xx";
}
}
If you change x.Value, then array[0].Value will also change.
ref/outin parameters, but that is different) in C#; this is different from say, PHP .. (There are ways to perform this task, but not exactly as envisioned.)