System
System.Collections.Generic
System.ComponentModel
System.Data
System.Data.SqlClient
System.IO
System.Linq
System.Linq.Expressions
System.Reflection
// Either copy this entire file to C:\Users\\Documents\LINQPad Plugins\ or copy and paste the
// ReadFrom(string file) method below into the MyExtensions class in your local version & and compile.
void Main()
{
// Write code to test your extensions here. Press F5 to compile and run.
}
public static class MyExtensions
{
// Write custom extension methods here. They will be available to all queries.
public static IEnumerable ReadFrom(string file)
{
string line;
using(var reader = File.OpenText(file))
{
while((line = reader.ReadLine()) != null)
{
yield return line;
}
}
}
}