as String... Function for DataSource ?

  • Thread starter Thread starter Adrian Turner
  • Start date Start date
A

Adrian Turner

Hi, I have used this simple approach to build a dropdown control.

Dim Times() as string = {"00:00","00:15"}
Times1.Datasource=Times:Times1.Databind()

What I'm wondering if I can do something like...
Dim Times() as string = {BuildTimes()}

It doesnt seem to work. I dont know if the syntax I'm using is incorrect, or
if it's just not possible. Any help would be appreciated.
 
I think I might be doing it incorrect. I am using Function BuildTimes() as
String.
I have tried removing the Brackets an it errors. Is a String Array different ?

regards,

Adrian
 
Thanks for you help. I will look at what you sent, but I just used split and
it works fine. Thanks.

Mark Rae said:
[please don't top-post]
http://www.caliburn.nl/topposting.html

I think I might be doing it incorrect. I am using Function BuildTimes() as
String. I have tried removing the Brackets an it errors. I

And what is the error...?

Is a String Array different ?

Is a string array different from a string? Well, yes it is:
http://www.google.co.uk/search?hl=en&q=vb.net+array+of+strings&meta=&aq=3&oq="VB.NET"+array

However, there is little (if any) difference between "Dim v As String()" and
"Dim v() As String"
http://stackoverflow.com/questions/...e-between-dim-v-as-string-and-dim-v-as-string

Please bottom-post the entire BuildTimes() function.
 
Is BuildTimes() a function which returns a string array? If so, then you
don't need the brackets...

Specifically, you don't need the BRACES. Our British friends will disagree,
but I say there are no brackets in

Dim Times() as string = {BuildTimes()}

just parentheses and braces.
 
Back
Top