Click here to Skip to main content
15,913,245 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: No no limits ^^ Pin
MohammadAmiry23-May-06 6:39
MohammadAmiry23-May-06 6:39 
QuestionEfficient array save/load Pin
MohammadAmiry23-May-06 6:14
MohammadAmiry23-May-06 6:14 
AnswerI found the answer! Pin
MohammadAmiry23-May-06 6:45
MohammadAmiry23-May-06 6:45 
QuestionVB.NET question Pin
Blue Bird23-May-06 5:07
Blue Bird23-May-06 5:07 
AnswerRe: VB.NET question Pin
Wooster200623-May-06 5:16
Wooster200623-May-06 5:16 
GeneralRe: VB.NET question Pin
Joshua Quick23-May-06 12:41
Joshua Quick23-May-06 12:41 
AnswerRe: VB.NET question [modified] Pin
j-on23-May-06 5:21
j-on23-May-06 5:21 
GeneralRe: VB.NET question [modified] Pin
Joshua Quick23-May-06 12:50
Joshua Quick23-May-06 12:50 
j-on wrote:
Dim nSize As Integer = 24
Dim pObjArray(nSize) As Object


Not quite right.
This array contains 25 elements. Not 24.

In VB.NET, the value that you use to set the array size does not represent the "Capacity" of the array like how it's done in C#. It represents the max "Index" of the array. And remember that arrays in VB.NET are zero based. So, if you count the elements from 0 to 24, you have a total of 25 elements. What you want to do is this instead.

Dim nSize As Integer = 24<br />
Dim pObjArray(nSize - 1) As Object


This is one of the major difference between C# and VB.NET's handling of arrays.

-- modified at 18:51 Tuesday 23rd May, 2006
AnswerRe: VB.NET question Pin
Joshua Quick23-May-06 13:06
Joshua Quick23-May-06 13:06 
AnswerRe: VB.NET question Pin
Dave Doknjas23-May-06 14:25
Dave Doknjas23-May-06 14:25 
Questionvb.net job vb.net job Pin
KRISHNENDU MUKHERJEE23-May-06 4:32
KRISHNENDU MUKHERJEE23-May-06 4:32 
QuestionHiding controls in design view Pin
Joshua Boyle23-May-06 4:00
Joshua Boyle23-May-06 4:00 
AnswerRe: Hiding controls in design view Pin
Wooster200623-May-06 5:18
Wooster200623-May-06 5:18 
GeneralRe: Hiding controls in design view Pin
Joshua Boyle23-May-06 5:37
Joshua Boyle23-May-06 5:37 
GeneralRe: Hiding controls in design view Pin
MohammadAmiry23-May-06 6:21
MohammadAmiry23-May-06 6:21 
GeneralRe: Hiding controls in design view Pin
thesqler23-May-06 9:43
thesqler23-May-06 9:43 
AnswerRe: Hiding controls in design view Pin
Roy Heil23-May-06 10:57
professionalRoy Heil23-May-06 10:57 
GeneralRe: Hiding controls in design view [modified] Pin
Joshua Boyle25-May-06 3:15
Joshua Boyle25-May-06 3:15 
Questionhow to do grab handeling in vb.net Pin
ruchig23-May-06 3:57
ruchig23-May-06 3:57 
QuestionStopping a recursive function in the middle. Pin
Almerica23-May-06 3:56
Almerica23-May-06 3:56 
AnswerRe: Stopping a recursive function in the middle. Pin
arcticbrew23-May-06 11:17
arcticbrew23-May-06 11:17 
GeneralRe: Stopping a recursive function in the middle. Pin
Almerica25-May-06 3:26
Almerica25-May-06 3:26 
Questioncreating a scheduling control like a calendar Pin
SandyMarie23-May-06 3:51
SandyMarie23-May-06 3:51 
QuestionProblem with Port Address in VB.Net Remoting Pin
Virani23-May-06 2:39
Virani23-May-06 2:39 
QuestionListView.ShowGroups=TRUE Pin
Greeky23-May-06 1:23
Greeky23-May-06 1:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.