0

i set : 3 in argument x, and program says syntax error seems that index can not be more that 1. why?

19th Jun 2019, 12:34 AM
Edwin Boada
Edwin Boada - avatar
6 Answers
+ 5
Please give us the one that produces the error
19th Jun 2019, 12:51 AM
Mind To Machine đŸ’»đŸ•†
Mind To Machine đŸ’»đŸ•† - avatar
+ 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)
19th Jun 2019, 1:16 AM
Mind To Machine đŸ’»đŸ•†
Mind To Machine đŸ’»đŸ•† - avatar
+ 1
Code please
19th Jun 2019, 12:36 AM
Lexfuturorum
Lexfuturorum - avatar
+ 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# .
19th Jun 2019, 1:00 AM
Edwin Boada
Edwin Boada - avatar
+ 1
oh , okok thanks it is how array ok .
19th Jun 2019, 2:04 AM
Edwin Boada
Edwin Boada - avatar
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
19th Jun 2019, 12:42 AM
Edwin Boada
Edwin Boada - avatar