Declaring Arrays
Array are declared in the following wai in C#
eg:
int[ ] myArray;
myArray[10]=5;
or we can define as this,
int[] myArray={1,2,3,5,7,3,5,7};
also we can
int[] myArray = new int[5] {5, 9, 10, 2, 99};
const int Size = 5;
int[] myArray = new int[Size] {5, 9, 10, 2, 99};
Here the one simple program that use String Array
You can see out put of above progarm in belove
No comments:
Post a Comment