dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online Membersnaveensanagasetti
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Forums » .NET » .NET »

Arraylist in c#.net


Posted Date: 12 May 2009      Posted By:: Ranganathan     Member Level: Gold    Member Rank: 681     Points: 1   Responses: 7



hi expects

how to insert the value in arraylist and how to read the value in arraylist

thnaks for sharing



Ranganathan Palanisamy




Responses

#377411    Author: Bobbin Paulose      Member Level: Gold      Member Rank: 426     Date: 12/May/2009   Rating: 2 out of 52 out of 5     Points: 2

Hai

If you are a bigenner in array list, go through this site

http://www.w3schools.com/aspnet/aspnet_arraylist.asp



 
#377414    Author: Nisar      Member Level: Gold      Member Rank: 65     Date: 12/May/2009   Rating: 2 out of 52 out of 5     Points: 2

please visit below link

http://www.dotnetspider.com/resources/17-Using-ArrayList.aspx

_______________________________
Nisar Ahmad
DotNetSpider MVM, Badge of Appreciation Award – 2010
Greatness Can't be achieved by doing big things, If you really want to be great, Do small things in Great way.
My Forum



 
#377421    Author: Pendyala      Member Level: Gold      Member Rank: 0     Date: 12/May/2009   Rating: 2 out of 52 out of 5     Points: 2

Hi,

inserting an element in to array list:
ArrayList testlist = new ArrayList();
Testlist.Add("One");
Testlist.Add("Two");
Testlist.Add("Three");


retrieving values from arraylist:
for (int i=0;i < Testlist.Count - 1;i++)
{
Response.Write(Testlist(i).ToString() + "<br>")
}

Hope it may helps u......
Thanx,
Pendyala






 
#377422    Author: HimaBindu Vejella      Member Level: Gold      Member Rank: 42     Date: 12/May/2009   Rating: 2 out of 52 out of 5     Points: 2

code for creation and insertion
ArrayList myList = new ArrayList();
myList.Add ("hima"); // Add a string.
myList.Add(1032); // Add an integer
myList.Add( DateTime.Now ); // Add current time.
myList.Add( new DataTable() ); // Add a datatable

http://himabinduvejella.blogspot.com
http://sysntaxhelp.com/asp.net
http://groups.google.com/group/mugh
Hima's Tech Blog



 
#377444    Author: jananeekar      Member Level: Silver      Member Rank: 0     Date: 12/May/2009   Rating: 2 out of 52 out of 5     Points: 2

Hai,
ArrayList is a class in System.Collections namespace
it can store any kind of object, forexample there is no restriction on the kind of objects that an arraylist can store. One can achieve the functionality of arraylist containing one type of objects such as arraylist containing strings only, or intergers only or some other kind by using the concept of generics.

happy programming



 
#377453    Author: Parashu(Swathimutyam)      Member Level: Gold      Member Rank: 0     Date: 12/May/2009   Rating: 2 out of 52 out of 5     Points: 2

many ways to insert or bind the values into Arraylist:

like Arraylist.add() //indivudal data.
arrayList.AddRange() //Collection of records can Add
arrayList.Insert() //insert indivudal data.
arrayList.InsertRange()//insert at specific data..


like this many ways we can manipulate arraylist easily...


i hope the above things will help you a bit.


Parashu
Love coding



 
#377516    Author: Ranganathan      Member Level: Gold      Member Rank: 681     Date: 13/May/2009   Rating: 2 out of 52 out of 5     Points: 2

hi thnks for reply

code:

ArrayList alist = new ArrayList();
alist.AddRange(chk.getgroupdata());
for (int i = 0; i < alist.Count; i++)
{
comboBox1.Items.Add(alist[i].ToString());
}

Ranganathan Palanisamy



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Urgent populate treeview from database-node,childnode,chilchild node present in 3 diff tab
Previous : Doubt in gridview?
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.