Adding string array (string[]) to List c#

前端 未结 3 648

When the string[], _lineParts is added to the List, all I see in the List is \"System.String[]\" What needs to be done to see the actually string[] values in the list.

相关标签:
3条回答
  • 2021-01-01 09:20

    Use List.AddRange instead of List.Add

    0 讨论(0)
  • 2021-01-01 09:35

    You can use List.AddRange() where you are using List.Add()

    0 讨论(0)
  • 2021-01-01 09:38

    Use List.AddRange instead of List.Add

    Change

     wrd.Add(_lineParts.ToString());
    

    To

    wrd.AddRange(_lineParts);
    
    0 讨论(0)
提交回复
热议问题