Generic.List

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I have a variable which is of type Generic.List(Of MyClass)

I want to get only the first 5 items added by the user. How can I do
this?

Thanks,
Miguel
 
Hello,
I have a variable which is of type Generic.List(Of MyClass)

I want to get only the first 5 items added by the user. How can I do
this?

Use the GetRange method, e.g.

myList.GetRange(0,5)
 

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

Similar Threads

Generic.List 2
Property. Which one should I use? 3
Property. 3
Dataset to Generic.List(Of MyClass) 4
Generic.List. Is this possible? 2
Property. Control or View State? 1
Generic.List 1
CheckBox 1

Back
Top