0
在C#中,如果我在下列情况下的输出是什么是按顺序执行的函数中的参数吗?
int i=0;
public int current_I(){return i;}
public int next_I(){return ++i;}
//---------
print(next_I(),current_I());
换句话说
我们可以知道哪些功能将首先执行具有的功能,打印它被假定它称为打印两个值... { current_I或next_I}或者就像C++一样,我们永远不会知道参数的执行顺序?
重复http://stackoverflow.com/questions/1215236/c-order-of-function-evaluation-vs-c? – reuben 2012-07-05 10:17:12
当你运行这段代码时你得到了什么? – V4Vendetta 2012-07-05 10:17:42
@ V4Vendetta,OP会得到两个1,我只能猜测'print'函数的作用;-) – Jodrell 2012-07-05 10:20:10