Printing a comma (,) after each item in an array

前端 未结 7 762
轮回少年
轮回少年 2020-12-20 17:28

Lets say I have an array (or list) of items

A[] = [a,b,c,d,e]

If I want to print them out so each item is separated by a comma (or any othe

相关标签:
7条回答
  • 2020-12-20 18:07

    Use the string.Join method, very handy.

    String.Join(",", my_array)
    
    0 讨论(0)
提交回复
热议问题