1.从System.String[]转到List<System.String>

            List<System.String> List = new List<System.String>();
            string[] str={"1","2","3"};
            List = new List<System.String>(str);

2.从List<System.String>转到System.String[]

            List<System.String> List = new List<System.String>();
            List.Add("1");
            List.Add("2");
            List.Add("3");
            System.String[] str = { };
            str = List.ToArray();

3.字符串数组可以,其他有些类型像int数组等等的也是可以的。

相关文章:

  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案