4 Replies - 558 Views - Last Post: 22 November 2017 - 11:32 AM Rate Topic: -----

#1 AmirulVB   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 23-October 17

Which Is Better in .net?

Posted 16 November 2017 - 09:16 PM

Hi guys,

Want to ask which is better using array or list to store a things??

Thanks!
Is This A Good Question/Topic? 0
  • +

Replies To: Which Is Better in .net?

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14094
  • View blog
  • Posts: 56,469
  • Joined: 12-June 08

Re: Which Is Better in .net?

Posted 16 November 2017 - 11:24 PM

Lists are typically more flexible.
Was This Post Helpful? 0
  • +
  • -

#3 maceysoftware   User is offline

  • Foo
  • member icon

Reputation: 353
  • View blog
  • Posts: 1,533
  • Joined: 07-September 13

Re: Which Is Better in .net?

Posted 17 November 2017 - 03:45 AM

Quite an open ended question really?

Better at what? Both have their uses.
Was This Post Helpful? 0
  • +
  • -

#4 AmirulVB   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 23-October 17

Re: Which Is Better in .net?

Posted 21 November 2017 - 10:42 PM

I'm Creating a 3 rectangle to store in the library ( my code is different because its a machine code but the logic is still same ) and i'm using array to store.Its work when u use it for first time but not work if u got an existing libraryMachine.Confuse lvl 100.So everytime i create new its work fine until u save it then it will crash(I didnt realise this kind of problem until the customer try :( my bad ).So mybe need to change it to list.Now im just make the 3 rectangle declare as 3 things in library easy to do then creating a list.

noted that we need to set pattern rectangle and then train(its stored in the lib) so dont hve enough time to do list but u guys can suggest and explain the easy way how the list work( with ez example like imagination,u get wat i mean? ).

Sorry for my annoying question :(.

And also if u have a link to make an exercise VB.Net/C# pless share with me.(i'm sorry asking you guys so mny things that cn be done with only use google)

P/s: i google before i mke this post but in my first post i explain it that im not very good in english so a bit difficult to understnd a bit because a website use a proper program languange.I think my problem here is i just remember all the code that i type but after that not very clear what code i should use when i do a different task.*sigh*
Was This Post Helpful? 0
  • +
  • -

#5 IronRazer   User is offline

  • Custom Control Freak
  • member icon

Reputation: 1499
  • View blog
  • Posts: 3,797
  • Joined: 01-February 13

Re: Which Is Better in .net?

Posted 22 November 2017 - 11:32 AM

Quote

... in my first post i explain it that im not very good in english ...

I don't see anything about that in your first post.

There is not anything real hard to understand about using a List. In most cases it is much more friendly to use than an Array. With a List, you do not need to use ReDim to resize it like you would with an array to add, remove, or insert any items. A List has Methods for Adding, Removing, and Inserting items in the List.

They usually show you example code in each page of the Methods link above that you can test and experiment with. There are also several tutorials and examples on the internet that will take you through each of the common methods.

Below is two Tutorials you can go through which explain each of the common methods. It would take you just as much effort and time to read our explanation of using a List as it would to read them in the tutorials. They even show the code as they explain it too.

How to use VB.NET List
VB.Net List Examples - Dot Net Perls
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1