?

Log in

Previous Entry | Next Entry

This youtube video created by www.questpond.com demonstrates different collection in .NET



First of all, all of them are used when we want to store more than one values but want to create one variable.

Arrays

  • Disadvantages

             o    Array is a fixed sized data structure. We cannot change the length of an array once it is created.
             o    Array requires continuous memory blocks.


  • Advantages

             o   Array is type safe (strongly type).

Array List

  • Disadvantages

             o    It’s not type safe.
             o    Performance wise not good because every time we add some value inside it, automatic boxing will
                   performed (value will converted to object) and every time we want to retrieve something from it we
                   have to explicitly perform unboxing(convert object back to value).

  • Advantages

             o    Dynamic size – With every new addition and removal of item, size of a data structure changes.
             o    Won’t require continuous memory allocation.

List

  • Advantages

            o    Strongly typed
            o    Dynamic size
            o    Won’t require continuous memory allocation.

If you are working on .net 2.0 or higher you should always go with List instead of Array List or Array.

One more most ask .NET interview question is around Generics see the below video for the same.



If you are looking for some live hardcore training on MVC, WCF, Design Patterns, BI, WPF, UML visit www.sukesh-marla.com or contact SukeshMarla@Gmail.com
Copy right www.questpond.com

Buy 600+ Real Time Interview Videos

Call +91-22-66752917 or mail us on questpond@questpond.com for more details on C#, .NET, ASP.NET, SQL Server interview question videos.

SQL Server interview question videos

Latest Month

January 2017
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Tags

Powered by LiveJournal.com