DataColumn.Expression Power

╄→гoц情女王★ 提交于 2019-12-08 07:55:00

问题


the following code

Dim dc = New DataColumn(name, GetType(Double), "[col1] ^ [col2]")

produces the following error:

The expression contains unsupported operator '^'.

Is this right, is the power operand not support in datacolumn expressions???

Anyone have an idea how i'd write this?


回答1:


Yes. it is not supported.

You could use RowChanging event of DataTable to set the value of the new column using c#.



来源:https://stackoverflow.com/questions/982754/datacolumn-expression-power

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!