Dynamic compilation (1)

xiaoxiao2021-03-06  42

statement of problem

-----------------

There is such an XML file, which is about the price list, the content is as follows:

9.00

100

0.95

10

Unit * Quantity * Discount - Other Offers

2.00

200

0.98

10

Unity * Quantity * Discount Additional Fee

The current demand is:

According to the "calculation expression" above (the user is given, it may change at any time) to find the value of each item.

Note: The above notebook is not the same as the calculation expression of the cup.

How to use C # automatically calculate the value of each item?

Idea:

(1) use XPath?

(2) Use dataset?

(3) Dynamic compilation, automatically calculate the value of the value of the expression to calculate the value, similar to the EVAl () in JavaScript.

(Endlessly)

转载请注明原文地址:https://www.9cbs.com/read-52205.html

New Post(0)