Arrays:
- Arrays are strongly typed. Hence only same type of elements can stored. (Ex. if “A” is an array, here we can store only integer or string or bool etc..).
- Since strongly typed, boxing and unboxing never happens.
- These are fixed in size and will not grow dynamically runtime.
- To store and to retrieve we should use integral index.
- Array don’t support Add() and Remove() functions.
ArrayList:
- ArrayList are not strongly typed(Loosely typed).
- Since Loosely typed, boxing and unboxing happens which results in performance problem.
- They can grow dynamically while runtime.
- ArrayList provide sufficient methods to work with like Add().
No comments:
Post a Comment