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

前端 未结 7 805
轮回少年
轮回少年 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)
    

提交回复
热议问题