public static void Main()
String[] myArray=new String[7]{"kama","dama","lama","yama","pama","rama","lama"};
myIndex=Array.IndexOf(myArray, myString);
Console.WriteLine("The first occurrence of myString between index 0 and index 6 is at index{0}.", myIndex);
myIndex=Array.LastIndexOf(myArray, myString);
Console.WriteLine("The last occurrence of myString between index 0 and index 6 is at index{0}.", myIndex);