public static void Main()
int[] myArray = [1,0,0,0,1,1,0,0,0,0];
for(int i=1; i< myArray.Length; i++)
int val = myArray[i]; int prevVal = myArray[i-1];
maxLength = Math.Max(count, maxLength);
maxLength = Math.Max(maxLength, count);
Console.WriteLine("Max Count : " + maxLength);
Console.WriteLine("last Value : " + lastValue);