static void Main(string[] args)
{
//Mp3 M = new Mp3();
//M.Playe += new Delegate(M_Playe);
//M.start();
//Console.Read();
int[] num = new int[] { 6, 3, 4, 2, 5 };
Array.Sort(num);
Console.WriteLine(Is(num));
Console.Read();
}
private static bool Is(int[] num)
{
for (int i = 0; i < num.Length - 1; i++)
{
if (num[i] + 1 != num[i+1])
{
return false;
}
}
return true;
} |