Does Array.ToString() provide a useful output?

前端 未结 6 1021
北海茫月
北海茫月 2020-12-03 13:31

If I have an array and perform a ToString() does that just string together the array values in one long comma seperated string or is that not possible on an arr

6条回答
  •  旧时难觅i
    2020-12-03 13:55

    It doesn't (as you noticed).

    For string arrays you can use:

    string.Join(",", myArray)
    

    for other arrays I think you need to code it yourself.

提交回复
热议问题