Collection - 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 ofmemory allocate in system
It isinitialize and with accessing with Square brackets []
Two dimensional arrayuse comma with in bracket
Int [ ] value=new int [ Length]
Arrays is fixed number of
It is
Two dimensional array
How to create Array:
// Int means data type suppose if you want string , bool , etc …
//value is data type
//length means , you can enter int value
val =new String[ 3];
ClassProgra
{
//Public void button Click
Stingval =new String[ 3];
Val[ 0] ="devenvexe ";
Val[ 1] ="Suthahar";
Val[ 2] ="Suresh";
Foreach ( string n in Val)
{
MesageBox . Show( n. Tostring);
}
}
//
//
Ex:
StringEx Program:
Using system;Class
{
//Public void button Click
Sting
Val
Val
Val
{
}
}
0 Comments