as String... Function for DataSource ?

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.
 
A

Adrian Turner

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
 
A

Adrian Turner

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.
 
J

Jeff Johnson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top