原始数据:

string input = "3,7,2,8,1,9,1,34,67,78,22";


要处理为:

string[] stringArray = { "3", "7", "2", "8", "1", "9", "1", "34", "67", "78", "22" };


最终处理为:

int[] intArray = { 3, 7, 2, 8, 1, 9, 1, 34, 67, 78, 22 };


好吧,我们创建一个类:
字符串阵列String[]转换为整型阵列Int[]

 class Ae
    {
        private string _InputValue;
        private char _Delimiter;

        public Ae(string inputValue, char delimiter)
        {
            this._InputValue = inputValue;
            this._Delimiter = delimiter;
        }

    }
Source Code

相关文章:

  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
猜你喜欢
  • 2021-12-27
  • 2022-12-23
  • 2021-08-30
  • 2021-10-06
  • 2022-12-23
  • 2021-11-14
  • 2021-09-24
相关资源
相似解决方案