请给我解决方案以获得“和” _price" [英] PLEASE GIVE ME SOLUTION to GET SUM of " _price "
问题描述
请给我解决方案以获得_price
for(int i = 0; i< countrows; i ++)
{
BluetoothPrintDriver.LF();
BluetoothPrintDriver.Excute();
BluetoothPrintDriver.ImportData(_price [i]);
BluetoothPrintDriver.LF();
BluetoothPrintDriver.Excute();
BluetoothPrintDriver.ClearData();
}
我尝试过:
for(int i = 0; i< countrows; i ++)
{
BluetoothPrintDriver.LF();
BluetoothPrintDriver.Excute() ;
BluetoothPrintDriver.ImportData(_price [i]);
BluetoothPrintDriver.LF();
BluetoothPrintDr iver.Excute();
BluetoothPrintDriver.ClearData();
}
PLEASE GIVE ME SOLUTION TO GET SUM OF _price
for (int i = 0; i < countrows; i++)
{
BluetoothPrintDriver.LF();
BluetoothPrintDriver.Excute();
BluetoothPrintDriver.ImportData(_price[i]);
BluetoothPrintDriver.LF();
BluetoothPrintDriver.Excute();
BluetoothPrintDriver.ClearData();
}
What I have tried:
for (int i = 0; i < countrows; i++)
{
BluetoothPrintDriver.LF();
BluetoothPrintDriver.Excute();
BluetoothPrintDriver.ImportData(_price[i]);
BluetoothPrintDriver.LF();
BluetoothPrintDriver.Excute();
BluetoothPrintDriver.ClearData();
}
推荐答案
我们不是代码订购服务:我们不为您工作,也不做功课。
但总结一个数组是微不足道的:
We aren't a "code to order" service: we do not do your work for you, nor do we do your homework.
But summing an array is trivial:
var sum = _price.Sum();
Enumerable.Sum方法 [ ^ ]
这篇关于请给我解决方案以获得“和” _price"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!