@Eric W Norman, your first example returns the same whether it's
This has to do with the fact that the "reference" is never altered - only the data that the references leads to is altered (the data IN the array)
Reference types are basically a pointer to the actual data - their "the address of the data in memory"
They just say "the data is located over here"
Value types, like integers, colors, doubles, booleans, hold the data directly. When you store 12 in an integer there is a spot in memory that holds that value.
When you pass that to a method byval, which is the default, you get a copy of that value for use in the method.
Any alterations to it are NOT stored back in the original.
When you pass one of these byref you are passing "the address" - the location of the data - not the value.
And so in the method any changes go to that address to read it OR write it and all those changes are done to the original.
With a reference type, its a bit different.
Reference types already are "the location of the data" - unlike a value type like an integer they are not "the value". Ehy just say "go to this spot in memory and you'll find the data there"
And any read / write can alter the data referred to because what was passed was the location of the data.
When you pass one of these types byref what you can now do is, as shown in the second example, assign an entirely new location.
In that example I could change the entire array.