Click here to Skip to main content
15,917,862 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How do I lock two Windows together Pin
Ray Cassick26-Oct-07 20:08
Ray Cassick26-Oct-07 20:08 
QuestionHow to genearte a Gant-Chart frorm VB.Net in MS Visio Pin
RobertSoelner26-Oct-07 3:16
RobertSoelner26-Oct-07 3:16 
AnswerRe: How to genearte a Gant-Chart frorm VB.Net in MS Visio Pin
Paul Conrad27-Oct-07 13:08
professionalPaul Conrad27-Oct-07 13:08 
QuestionDyanamic array declarations Pin
danasegaranea26-Oct-07 2:37
danasegaranea26-Oct-07 2:37 
AnswerRe: Dyanamic array declarations Pin
kubben26-Oct-07 3:14
kubben26-Oct-07 3:14 
GeneralRe: Dyanamic array declarations Pin
danasegaranea26-Oct-07 3:18
danasegaranea26-Oct-07 3:18 
GeneralRe: Dyanamic array declarations Pin
kubben26-Oct-07 3:31
kubben26-Oct-07 3:31 
AnswerRe: Dyanamic array declarations Pin
Dave Kreskowiak26-Oct-07 5:45
mveDave Kreskowiak26-Oct-07 5:45 
It doesn't work because the Names array doesn't have any elements in it. If you delcared the array as:
Dim Names(10) As String

it would contain 11 elements of type String, all with the value of String.Empty.

The way you've done it, there are no elements in the array. You'd have to ReDim the array to the proper size, then call CopyTo
Sub New(ByVal st As List(Of String))
    ReDim Names(st.Count - 1)
    st.CopyTo(Names)
End Sub

But, I highly recommend changing the array to a List.
Private _names As List(Of String)

Public Sub New(ByVal st As List(Of String))
    _names.AddRange(st)
End Sub



A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: Dyanamic array declarations Pin
danasegaranea26-Oct-07 18:28
danasegaranea26-Oct-07 18:28 
Questioncrystal reports deployment [modified] [SOLVED] Pin
Tom Deketelaere26-Oct-07 1:43
professionalTom Deketelaere26-Oct-07 1:43 
QuestionAbt displaying images placed in one web page randomly display each at atime Pin
sivaram praveen26-Oct-07 1:28
sivaram praveen26-Oct-07 1:28 
AnswerRe: Abt displaying images placed in one web page randomly display each at atime Pin
Dave Kreskowiak26-Oct-07 5:38
mveDave Kreskowiak26-Oct-07 5:38 
Questionaudio recording problem with mciExecute(). Pin
kadkir26-Oct-07 0:05
kadkir26-Oct-07 0:05 
AnswerRe: audio recording problem with mciExecute(). Pin
Dave Kreskowiak26-Oct-07 5:36
mveDave Kreskowiak26-Oct-07 5:36 
Questionhelp with mapping from the server to the local host Pin
Aikho25-Oct-07 23:39
Aikho25-Oct-07 23:39 
AnswerRe: help with mapping from the server to the local host Pin
pmarfleet25-Oct-07 23:49
pmarfleet25-Oct-07 23:49 
QuestionProblem in Array(VB6) Pin
Paramhans Dubey25-Oct-07 23:18
professionalParamhans Dubey25-Oct-07 23:18 
AnswerRe: Problem in Array(VB6) Pin
Christian Graus25-Oct-07 23:53
protectorChristian Graus25-Oct-07 23:53 
AnswerRe: Problem in Array(VB6) Pin
Dave Kreskowiak26-Oct-07 5:33
mveDave Kreskowiak26-Oct-07 5:33 
QuestionFrame Tag..., Pin
Member 387988125-Oct-07 22:31
Member 387988125-Oct-07 22:31 
AnswerRe: Frame Tag..., Pin
SHatchard25-Oct-07 22:39
SHatchard25-Oct-07 22:39 
Questiontrying to zoom the control Pin
eyes200725-Oct-07 22:11
eyes200725-Oct-07 22:11 
AnswerRe: trying to zoom the control Pin
Dave Kreskowiak26-Oct-07 5:27
mveDave Kreskowiak26-Oct-07 5:27 
QuestionHow to add Unicode string in String Table. Pin
birajendu25-Oct-07 21:36
birajendu25-Oct-07 21:36 
AnswerRe: How to add Unicode string in String Table. Pin
Dave Kreskowiak26-Oct-07 5:24
mveDave Kreskowiak26-Oct-07 5:24 

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.