Ok so I have a string array like so:
string[] myStringArray = new string[2];
myStringArray[0] = "Foo";
myStringArray[1] = "Bar";
To declare a new string and make it equal to the first string in my array do I do this:
string foo = myStringArray[0];
Or this:
string foo = myStringArray[0].ToString();
Fundamental stuff I know but if you don’t ask…
Thanks
You do this:
Calling
.ToStringon a string instance simply returns this same instance so you don’t need it. Here’s how this method is defined for the string class: