[求助]C#为什么不支持 for (i=1,j=1; i
for (i=1,j=1; i<=9,j<=9; i++,j++){
Console.WriteLine("{0}×{1}={2}\t", i, j, i*j);
}
编译竟然通不过。
The for-initializer, if present, consists of either a local-variable-declaration or a list of statement-expressions separated by commas. The scope of a local variable declared by a for-initializer starts at the local-variable-declarator for the variable and extends to the end of the embedded statement. The scope includes the for-condition and the for-iterator.
The for-condition, if present, must be a boolean-expression.
The for-iterator, if present, consists of a list of statement-expressions separated by commas.
C/C++和Java中有逗号运算符,但在C#中却没有。[此贴子已经被作者于2006-5-11 10:12:16编辑过]