using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConTestRandom
{
class CheckUpdate
{
public static IEnumerable<int> Show(int[]nums)
{
yield return nums.Max();
yield return nums.Min();
yield return nums.Sum();
}
static void GetValue(int[]datas,out int min, out int max, out int sum)
{
min = datas.Min();
max = datas.Max();
sum = datas.Sum();
}
static object Foo(int []datas)
{
return new{Max=datas.Max(),Min=datas.Min(),Sum=datas.Sum()};
}
public static void Main()
{
//int[] datas = { 10, 12, 24, 26 };
//int []results = Show(datas).ToArray();
//string msg = string.Format("最小值:" + results[1] + "最大值:" + results[0] + "求和:" + results[2]);
//Console.WriteLine(msg);
//int[] datas = { 10, 12, 24, 26 };
//int min, max, sum;
//GetValue(datas, out min, out max, out sum);
//string msg = string.Format("最小值:" + min + "最大值:" + max + "求和:" + sum);
//Console.WriteLine(msg);
// Console.WriteLine();
int[] datas = { 10, 12, 24, 26 };
dynamic results = Foo(datas);
string msg = string.Format("最小值:" + results.Min+ "最大值:" + results.Max + "求和:" + results.Sum);
Console.WriteLine(msg);
Console.Read();
}
}
}