falled
Member
- Joined
- Sep 16, 2006
- Messages
- 20
- Programming Experience
- Beginner
I need a smart way to store pairs of integers, I've tried by using arrays of array but always give me some strange error of references or nullpointers
in my class i've been declared like this
And then I try to put the elements in the array, looking to not point to the out of the array.
There's any other way to create a structure of pairs of integers, there's any kind of struct?
Thank you all and Sorry For my bad english
Visca el barça
in my class i've been declared like this
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] List()() [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] nElements [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] nEl [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]List = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2](nEl)() {}[/SIZE]
[SIZE=2]List(nEl) = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2](2) {}[/SIZE]
[SIZE=2]nElements = nEl[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
And then I try to put the elements in the array, looking to not point to the out of the array.
There's any other way to create a structure of pairs of integers, there's any kind of struct?
Thank you all and Sorry For my bad english
Visca el barça