using System;
namespace ConsoleApplication_C_Sharp
{
class Program
{
static void Main(string[] args)
{
String[] arr = new String[] { "hhh10", "ccc100", "bbb1000", "ggg10000",
"eee100000", "aaa100000", "ddd333" };
if (Array.TrueForAll(arr, EndsWithInteger))
Console.WriteLine("All elements end with integer");
else
Console.WriteLine("Not all elements end with an integer");
}
private static bool EndsWithInteger(String value)
{
int s;
return Int32.TryParse(value.Substring(value.Length - 1), out s);
}
}
}
/*
run:
All elements end with integer
*/