Click here to Skip to main content
15,905,874 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Refresh Data Pin
geekgautam24-Jun-11 8:01
geekgautam24-Jun-11 8:01 
AnswerRe: VB and MS Excel Pin
Dalek Dave23-Jun-11 3:39
professionalDalek Dave23-Jun-11 3:39 
GeneralRe: VB and MS Excel Pin
geekgautam23-Jun-11 18:29
geekgautam23-Jun-11 18:29 
GeneralRe: VB and MS Excel Pin
geekgautam4-Jul-11 22:44
geekgautam4-Jul-11 22:44 
AnswerRe: VB and MS Excel Pin
Mycroft Holmes23-Jun-11 22:53
professionalMycroft Holmes23-Jun-11 22:53 
GeneralRe: VB and MS Excel Pin
geekgautam24-Jun-11 8:04
geekgautam24-Jun-11 8:04 
GeneralRe: VB and MS Excel Pin
Dalek Dave26-Jun-11 1:59
professionalDalek Dave26-Jun-11 1:59 
QuestionList(Of Integer) vs. an array (VB.NET 2008) Pin
Steven St. John21-Jun-11 5:45
Steven St. John21-Jun-11 5:45 
I am a hobbyist programmer, and this may be a newbie question that has been asked before, but I was unsuccessful searching through the forums.

I am writing a data analysis program that reads disk files and parses the information. Each file is one "session" and each session contains many "trials". Trials are identified by a number of items (trial length, trial stimulus, etc.) and also holds data which are a bunch of integers.

So, I am building a trial class that has a number of properties, but one of those properties will be this array of integers (of unknown number). I'm wondering if I should represent that in the class as a simple array which heavily makes use of ReDim statements as the numbers are read and added to the array, or if I should instead represent them as a List(Of Integer) using the Add method to grow the collection.

This is a philosophical question, not a coding question. I'm sure I will be able to code it either way. What I don't know is whether one or the other is preferable considering performance or other issues. I understand that using a collection would be a bad idea because of boxing/unboxing issues, but I was given to believe List(Of T) does not suffer this penalty.

If List(Of Integer) is preferable, would you go on to say that one should always use generics and that arrays of values are always less preferable? Or perhaps a List(Of Integer) and an array of integers are the same under the hood?

Thanks.
AnswerRe: List(Of Integer) vs. an array (VB.NET 2008) => Use List PinPopular
MicroVirus21-Jun-11 7:12
MicroVirus21-Jun-11 7:12 
GeneralRe: List(Of Integer) vs. an array (VB.NET 2008) => Use List Pin
Thomas Krojer21-Jun-11 20:46
Thomas Krojer21-Jun-11 20:46 
GeneralRe: List(Of Integer) vs. an array (VB.NET 2008) => Use List Pin
MicroVirus21-Jun-11 22:06
MicroVirus21-Jun-11 22:06 
GeneralRe: List(Of Integer) vs. an array (VB.NET 2008) => Use List Pin
Thomas Krojer22-Jun-11 0:42
Thomas Krojer22-Jun-11 0:42 
JokeRe: List(Of Integer) vs. an array (VB.NET 2008) => Use List Pin
MicroVirus22-Jun-11 1:03
MicroVirus22-Jun-11 1:03 
GeneralRe: List(Of Integer) vs. an array (VB.NET 2008) => Use List Pin
Thomas Krojer22-Jun-11 2:01
Thomas Krojer22-Jun-11 2:01 
GeneralRe: List(Of Integer) vs. an array (VB.NET 2008) => Use List Pin
Steven St. John23-Jun-11 11:40
Steven St. John23-Jun-11 11:40 
AnswerRe: List(Of Integer) vs. an array (VB.NET 2008) Pin
AspDotNetDev23-Jun-11 10:16
protectorAspDotNetDev23-Jun-11 10:16 
GeneralRe: List(Of Integer) vs. an array (VB.NET 2008) Pin
Steven St. John23-Jun-11 11:41
Steven St. John23-Jun-11 11:41 
GeneralRe: List(Of Integer) vs. an array (VB.NET 2008) Pin
AspDotNetDev23-Jun-11 12:04
protectorAspDotNetDev23-Jun-11 12:04 
QuestionRequest Pin
QASKU20-Jun-11 2:18
QASKU20-Jun-11 2:18 
AnswerRe: Request Pin
Dalek Dave20-Jun-11 13:18
professionalDalek Dave20-Jun-11 13:18 
QuestionHow to show alert when new records added to database in windows application??? Pin
Sanjay Tiwari120-Jun-11 0:10
Sanjay Tiwari120-Jun-11 0:10 
AnswerRe: How to show alert when new records added to database in windows application??? Pin
Wayne Gaylard20-Jun-11 2:12
professionalWayne Gaylard20-Jun-11 2:12 
GeneralTimer Pin
David Mujica20-Jun-11 2:45
David Mujica20-Jun-11 2:45 
QuestionUpgrade VB6 Database to VB10 Pin
Garner T19-Jun-11 11:07
Garner T19-Jun-11 11:07 
AnswerRe: Upgrade VB6 Database to VB10 Pin
RobCroll19-Jun-11 21:11
RobCroll19-Jun-11 21:11 

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.