c# collection

 C# collection 

          Collection classes are specializes for data storage retrieval all types of collection classes implemented system library 


There are some type of collector 

1. Arraylist

2.Stack

3.Queue

4.Shorted list


 1.Array list 

             All data items stored in a form of array 


NOTE: All types of collection is used collection library 


Q. How to add data in arraylist

           Using add function adding data value in arraylist


Foe each loop 

            for each loop is used to work in a object 


NOTE: For each not used>< or any relational symbol 

1.For each By default start from 0

2.For each not use variable 

3.for each w use(usingsystem.collection;) library


Q. How to arrange data value in array list.

 NOTE: Arrange data value with help of sort() function 


2) Stack

Property

         Last in first out.

  Stack obj = new Stack ();

 Push() use to inserting data in stack 

 Pop () use to delete data in stack.


Enums 

1) Enum has a special type of 

2) It class represent group of constant member.


     Syntax 

             Enum name

             {

             mem1()

             mem2()

             mem3()

             }


Member is read only

    *Enum also declare before the main class.


☆ file Handling File is a logical collection of data


There are two types of file

1) system file 

2) Wien file. (user Input).


In C# Handle all type of file using IO library. 


Using System. 20

 WriteAllText for write data

 ReadAllText for Read data












Comments

Popular posts from this blog

Basic Query program(insert,update,delete,select)

Data transmission and query string

Detailview(program)