.net - Is Arraylist is typesafe or strongly typed? -
i don't know difference between "strongly typed" , "type safety" is!
could please clarify in simple language?
suppose using arraylist, unable conclude typesafe or typed. or can use both.?
an arraylist not typesafe. means arraylist can assigned value of type:
arraylist mylist = new arraylist(); mylist.add("this string"); mylist.add(19); //notice int, doesn't throw error! this issue because when go use list, don't know types in list. chances of having error thrown high.
avoid using arraylists! use generic list instead, such list<t>
Comments
Post a Comment