C# DataTable Sum Column Values with Filter: 'Class='课件''
This code snippet is incomplete and doesn't specify which column to sum. You need to add the name of the column you want to sum after the Sum method. The correct syntax is:
dt.Select('Class='课件'') .Sum('ColumnToSum')
Replace 'ColumnToSum' with the actual name of the column you want to sum in your DataTable. For example, if you want to sum the values in a column named 'Score', the code would be:
dt.Select('Class='课件'') .Sum('Score')
原文地址: https://www.cveoy.top/t/topic/noGh 著作权归作者所有。请勿转载和采集!