[C#] C# 字符串数组转换为整形数组 →→→→→进入此内容的聊天室

来自 , 2020-09-16, 写在 C#, 查看 142 次.
URL http://www.code666.cn/view/b1b0ef5b
  1. /// <summary>
  2. /// 字符串数组转换整形数组
  3. /// </summary>
  4. /// <param name="Content">字符串数组</param>
  5. /// <returns></returns>
  6. public static int[] ToIntArray(string[] Content)
  7. {
  8.         int[] c = new int[Content.Length];
  9.         for(int i = 0; i < Content.Length; i++) {
  10.                 c[i] = Convert.ToInt32(Content[i].ToString());
  11.         }
  12.         return c;
  13. }
  14. //csharp/1111

回复 " C# 字符串数组转换为整形数组"

这儿你可以回复上面这条便签

captcha