>Okay, I did some digging in the MSDN help for Visual Studio 2010 Beta 2. It seems that Microsoft has changed the creation and initializing of arrays from a 2-step Texas jig to a 1-step Tennessee crawl, as follows:
>
>
http://msdn.microsoft.com/en-us/library/0a7fscd0(VS.100).aspx>
>Here's an example of how you'd set up an array of 10 integer array elements, and the same for a string array of 10 elements. It's a 1-step process in Visual Studio 2010 for C#. I tried it and there were no longer any errors.
>
>
>int[] numbers = new int[10];
>string[] strMyStringArray = new string[10];
>
>
>Cecil
>
You are interpreting it wrong. Nothing has changed in 2010. It was always like that.
public class test
{
int[] numbers = new int[10]; // need to be in a single line
static void Main()
{
int[] myNumbers;
myNumbers = new int[10];
}
}
is legal syntax in all versions. And the following is illegal yet again in all versions:
public class test
{
int[] numbers;
numbers = new int[10]; // need to be in a single line
static void Main()
{
int[] myNumbers;
myNumbers = new int[10];
}
}
Cetin