0
i set : 3 in argument x, and program says syntax error seems that index can not be more that 1. why?
6 odpowiedzi
+ 5
Please give us the one that produces the error
+ 4
if you read the error it states "index must be greater than or equal to zero and less than argument list"
and the index is zero based (first one must be zero like arrays)
+ 1
Code please
+ 1
in this line: Console.WriteLine("x={0};y={1}",x,y); i put 3 or another number in x value in place of zero and says error, why? i 'm new in this c# .
+ 1
oh , okok thanks it is how array ok .
0
static void Main(string[] args)
{
int x = 10;
double y = 20;
Console.WriteLine("x = {0}; y = {1}", x, y);
}
// Output: x = 10; y = 20