|
-
Apr 18th, 2004, 12:47 AM
#1
initializing a 2D array?
Apparently when you declare a 2D array you can't initialize the size of the second dimension. This what I'm doing right now...
PHP Code:
byte[][] intensityVals = new byte[height][];
for (int i=0; i<height; i++)
intensityVals[i] = new byte[width];
isn't there a better or shorter way?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Apr 18th, 2004, 01:09 AM
#2
Frenzied Member
VB Code:
[b]Single-dimensional array[/b]
int[] numbers = new int[5];
[b]Multidimensional array[/b]
string[,] names = new string[5,4];
[b]Array-of-arrays (jagged array)[/b]
byte[][] scores = new byte[5][];
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Apr 18th, 2004, 01:12 AM
#3
Originally posted by Memnoch1207
VB Code:
[b]Single-dimensional array
int[] numbers = new int[5];
[b]Multidimensional array[/b]
string[,] names = new string[5,4];
[b]Array-of-arrays (jagged array)[/b]
byte[][] scores = new byte[5][];
[/B]
hmm interesting thank you! second one was what I was looking for...
umm I still dont understand the difference between declaring it like [x][y] versus [x,y].... both seem to work the same? hmm (is it just that they work the same but are different structurally?)
excuse my idiot-ness btw
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|