Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Wednesday, June 8, 2011

Collection - Array

Array
Arrays are references that point to fixed sizes of memory that you can store different kinds of elements in, such as values or references to other objects. In these examples, we look at simple examples of arrays.

·       Arrays is fixed number of memory allocate in system
·       It is initialize and with accessing with Square brackets []
·       Two dimensional array use comma with in bracket
How to create Array:   
 Int[] value=new int[Length]
// Int means data type suppose if you want string,bool,etc…
// value  is data type
// length means ,you can enter int value
Ex:
String val=new String[3];
Ex Program:
Using system;
Class Progra
{
//Public void button Click
Sting val=new String[3];
Val[0]="devenvexe";
Val[1]="Suthahar";
Val[2]="Suresh";
Foreach(string n in Val)
{
MesageBox.Show(n.Tostring);
}
}
Post a Comment