B
Bradley1234
Im trying to now manipulate arrays in C#
Point[] points = new Point[200];
for (int x = 0; x < 200; x++)
{
points[x] = { (20 + x) , ( += null) }; //any variation of brackets and commas fails.
}
Im trying to draw using Graphics DrawLines, which takes coordinates to draw a line from last to next, etc
Then trying to fill up an array of the 200 points with specific data. The use here is Point(int x1, int y1)
The format of the array of points is x1 = an offset of 20 added to the running value of the "x" in the for loop, and then y1 can be any value between 0 and 200.
Just trying to initialize the array to anything? has proven difficult, the array control doesnt seem as powerful as C
Then in a C# book, it says use the C# Indexer Wizard, simply right click on the class where your array is, and it gives you a wizard to construct what youre trying to do. But the one Im using has nothing like that...
Is this a common tool? Indexer Wizard? Or how are arrays managed in C# thats so different?
thanks
Point[] points = new Point[200];
for (int x = 0; x < 200; x++)
{
points[x] = { (20 + x) , ( += null) }; //any variation of brackets and commas fails.
}
Im trying to draw using Graphics DrawLines, which takes coordinates to draw a line from last to next, etc
Then trying to fill up an array of the 200 points with specific data. The use here is Point(int x1, int y1)
The format of the array of points is x1 = an offset of 20 added to the running value of the "x" in the for loop, and then y1 can be any value between 0 and 200.
Just trying to initialize the array to anything? has proven difficult, the array control doesnt seem as powerful as C
Then in a C# book, it says use the C# Indexer Wizard, simply right click on the class where your array is, and it gives you a wizard to construct what youre trying to do. But the one Im using has nothing like that...
Is this a common tool? Indexer Wizard? Or how are arrays managed in C# thats so different?
thanks