C# .NET - difference between int[] a and int a[] in c#.net
Asked By kiruba .e on 10-Mar-13 01:05 AM
Hi,
I have doubt on below.
What is the difference between in these belows:
int[] a and int a[];
Please help me on this.
Thanks
Regards
Kiruba.e
Danasegarane Arunachalam replied to kiruba .e on 10-Mar-13 04:46 AM
From MSDN(http://msdn.microsoft.com/en-us/library/aa288453%28v=vs.71%29.aspx)
When declaring an array, the square brackets ([]) must come after the
type, not the identifier. Placing the brackets after the identifier is
not legal syntax in C#.
And Java is supporting both ways.Java allows the option of placing the brackets after the type or after the
identifier. C# permits placement of the brackets only after the type.