Buy Questpond's video subscriptions on
huge discount
.
Online: 3523
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
C#
>
Loading ...
difference between array and collection in .net
Posted by
Shanky11
under
C#
on 1/31/2013 |
Points: 10
| Views : 20250 | Status :
[Member]
| Replies : 2
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
difference between array and collection in .net?????????????????/
why array and collection is used ??????????????????
tell me in details?
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Sammy
on: 1/31/2013
[Member]
Starter
|
Points: 25
0
answer:
1) use an array when the number of elements that need to be inserted into the array is known at compile time and it remains fixed throughout the execution of the program. You use a collection when you do not know how many elements you will need to store. So basically a collection can grow in size dynamically. The data structure used to implement the collection depends on the collection type. e.g. for a Arraylist a doubly linked list may be used.
2) You can store elements of similar type only in an array. Unless ofcourse you declare an array of type 'Object'. In a collection you can store any type of elements provided they are all objects. You can store basic data types in an array. You can only store objects in a collection.
please mark this as answer if you find this interesting.
Regards
Samiran Chandra Bhuin
Shanky11
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Kundan64
on: 1/31/2013
[Member]
Starter
|
Points: 25
0
Hi Shanky,
See the link:
http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/bfc6cf96-1ef2-4383-8dda-eca0d99ac15f/
It will really help you.
Shanky11
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...