Why is this c# snippet legal?
Posted
by Sir Psycho
on Stack Overflow
See other posts from Stack Overflow
or by Sir Psycho
Published on 2010-03-02T06:24:05Z
Indexed on
2010/03/08
21:06 UTC
Read the original article
Hit count: 317
Silly question, but why does the following line compile?
int[] i = new int[] {1,};
As you can see, I haven't entered in the second element and left a comma there. Still compiles even though you would expect it not to.
© Stack Overflow or respective owner