Monday, September 12, 2011

C # data structures

And 'useful for a programmer for the types of data structures of a programming language supported by knowledge. With the right data structures are not only important for the disposition and efficiency of a program, but also large increases intelligibility.

Fortunately for. NET programmers, supports C #. Net has a variety of data structures, including basic and some advanced.

Data Collection Tools

Field

The array is more or less the block data structures in C #.An array contains a number of elements in a list, usually defined as:

int [] intArray = new int [4];

An array can contain any type of object, but they must all be of the same type.

ArrayList

A extends ArrayList to the array size to be dynamic. Other types of objects can be stored within the same ArrayList.

List

The list of C # data structure is essentially an ArrayList with the difference that only one type of object canstored. This is an advantage when it comes to program the speed and readability.

LinkedList

LinkedList is an extended data structure. This structure consists of "nodes", take the three values: the object is to store a reference to a previous node and a reference to the next node. Basically image is like a chain, each node connected to the rest of the list.

Dictionary

The structure of the dictionary is like a tree list, but the index will be set. MeaningINDEC is generated automatically instead of (0, 1, 2, 3, etc. ..) are set by the user and can be of any type.

HashSet

The HashSet is a new departure in C # with. Net Framework 3.5

Stacks and queues

The stack and queue data structures are actually very similar. Both are a form of a list that only a certain object in a new position. A tail in the way objects have been added. A stack on the opposite side is the last element added.

C # data structures

No comments:

Post a Comment