|
| ||||||||||
| Tags: c programming, classes, collections, internet |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Collections in c#
|
|
#2
| ||||
| ||||
| Re: Collections in c#
When .Net Framework is developed it is developed with the facility that will able to provide you specialized classes for storing your data and also retrieve your stored data. These classes can support for the stacks, queues, lists, and hash tables. Most of the time you can come to know that the most of the collection classes will implement the same interface and those all interfaces will be inherited to create new collection classes. |
|
#3
| ||||
| ||||
| Re: Collections in c#
If you want to implement the custom collection class then you may need to use the coding below: Code: using System;
using System.Collections;
public class First: CollectionBase
{
public First this[int i]
{
get
{
return ((First)(List[i]));
}
set
{
List[i] = value;
}
}
public bool Contains(First first)
{
return List.Contains(first);
}
public int Add(First First)
{
return List.Add(First);
}
public void Insert(int i, First first)
{
List.Insert(i, first);
}
public void Remove(First first)
{
List.Remove(First);
}
} |
|
#4
| |||
| |||
| Re: Collections in c#
If you consider the collections in C# then you come to know that the c# collections may contain mane different forms. The System.Collections namespace provides you different classes, methods and properties. System.Collections namespace includes following interfaces:
|
|
#5
| ||||
| ||||
| Re: Collections in c#
For getting more information about the C# collections you may need to use the different books provided by the different authors. You can also search for the different pdf files which are available free of cost on internet and get knowledge about the c# from that. So, just make use of all those sources and you will able to get the solution for it. |
|
#6
| ||||
| ||||
| Re: Collections in c#
C# uses collection classes for different purposes. It is the set of classes which are developed for specially making group of objects and by the use of them you can able to perform specific task from them. There are many more collection classes available in C#, but mostly list and arraylist is used. Syntax for creating a List<T> : Code: List<type> name = new List<type>(); Code: ArrayList name = new ArrayList(); |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Collections in c#" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is there any need of collections in Garden of Time | Jagjeet-J | Video Games | 7 | 24-12-2011 04:47 AM |
| Collections available in FrontierVille | Meditation | Video Games | 4 | 07-02-2011 09:16 AM |
| Collections in Java | blueprats | Guides & Tutorials | 3 | 22-03-2010 02:51 PM |
| ConcurrentModificationException in Collections | ISAIAH | Software Development | 5 | 23-02-2010 04:42 AM |
| Ordered index in Collections | Aaliya Seth | Software Development | 5 | 20-02-2010 12:46 AM |