How to create this data source?

S

shapper

Hello,

I am creating a class where I have a repeater.

I want to create the source of the repeater inside the class as
follows:

1 Dim a As New MyClass
2 With a
3 .Add("item 01")
4 .Add("item 02")
5 .Add("item 03")
6 End With

Basically I would like to create a class object and add items to the
datasource of the repeater inside that class.

I was trying to create a method named Add inside my class which
receives a string and adds it to data object which could be used as
datasource of my repeater.

Or I could create come kind of property which would already have
the .add method in it.

Anyway, could someone tell me how to do this?

Thanks,

Miguel
 

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,796
Messages
2,569,645
Members
45,371
Latest member
TroyHursey

Latest Threads

Top