You never technically get an array of strings - you get an array of string
*references*. So regardless if you pass the struct by value (the 'default')
or by reference (ref, out) your strings' references will remain pointing at
the same strings (assuming no remoting). .NET strings are immutable, so
they somewhat appear to have value semantics in some way- but they in fast
are classes to which you get only a reference.
struct is passed by value. The array inside the struct is a pointer to the
first element in the array. Each element inside that array is a char* to
your string.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.