2016年4月12日 星期二

[C#]string[] convert to int[]

字串陣列 轉換成 數字陣列的寫法
   string[] tempRGB = str.Replace("rgb(", "").Replace(")", "").Split(',');

   int[] RGB = Array.ConvertAll(tempRGB, x => int.Parse(x));

沒有留言:

張貼留言