How to convert a char array to a string array?

后端 未结 4 1228
一向
一向 2021-02-14 01:52

Given:

A string dayCodes (i.e. \"MWF\" or \"MRFU\") that I need to split and create a collection of strings so I

4条回答
  •  醉酒成梦
    2021-02-14 02:35

    To answer the question in the title for anyone finding this in a search...(not the problem as described...thats one of earlier posts.)

    var t = "ABC";
    var s = t.ToCharArray().Select(c => c.ToString()).ToArray();

提交回复
热议问题