convert Decimal array to Double array

后端 未结 2 623
梦如初夏
梦如初夏 2021-02-12 10:10

What\'s an efficient and hopefully elegant incantation to convert decimal[] to double[]? I\'m working with some fairly large arrays.

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-12 11:16

    double[] doubleArray = Array.ConvertAll(decimalArray, x => (double)x);
    

提交回复
热议问题