using System;
using System.Linq;
using System.Collections.Generic;
namespace ConsoleApplication5
{
class Program
{
public class Class1
{
public IEnumerable<int> GetQuery(ref int[ ints)
{
return from i in ints where i > 0 select i;
}
}
static void Main(string[ args)
{
int[ dataSource = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Class1 c = new Class1();
var rows = c.GetQuery(ref dataSource);
Console.WriteLine("Average:{0}", rows.Average());
foreach (int i in rows) Console.WriteLine(i);
Console.Read();
}
}
}