mirror of
https://gitee.com/dotnetchina/MiniExcel.git
synced 2024-11-30 10:57:46 +08:00
3c6d2cdeb4
drafts\【LINQ】Deferred Execution.linq drafts\【MiniExcel】SaveByTemplate.linq drafts\【MiniExcel】multi level properties get value.linq drafts\【Reader】SQL ExecuteReader won't stop running immediately.linq drafts\【Reflection】PropertyType vs ReflectedType vs DeclaringType vs MemberType.linq
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
<Query Kind="Program">
|
|
<NuGetReference>Dapper</NuGetReference>
|
|
<NuGetReference>MiniExcel</NuGetReference>
|
|
<NuGetReference>Newtonsoft.Json</NuGetReference>
|
|
<NuGetReference>System.Data.SqlClient</NuGetReference>
|
|
<Namespace>Dapper</Namespace>
|
|
<Namespace>MiniExcelLibs</Namespace>
|
|
<Namespace>Newtonsoft.Json</Namespace>
|
|
<RemoveNamespace>System.Data</RemoveNamespace>
|
|
<RemoveNamespace>System.Diagnostics</RemoveNamespace>
|
|
<RemoveNamespace>System.Linq.Expressions</RemoveNamespace>
|
|
<RemoveNamespace>System.Text</RemoveNamespace>
|
|
<RemoveNamespace>System.Text.RegularExpressions</RemoveNamespace>
|
|
<RemoveNamespace>System.Threading</RemoveNamespace>
|
|
<RemoveNamespace>System.Transactions</RemoveNamespace>
|
|
<RemoveNamespace>System.Xml</RemoveNamespace>
|
|
<RemoveNamespace>System.Xml.Linq</RemoveNamespace>
|
|
<RemoveNamespace>System.Xml.XPath</RemoveNamespace>
|
|
</Query>
|
|
|
|
// 【LINQ】Deferred Execution
|
|
void Main()
|
|
{
|
|
var input = GetFooData();
|
|
{
|
|
var output = input.Skip(10).Take(5); //console output : 0..14
|
|
output.Count();
|
|
}
|
|
|
|
{
|
|
var output = input.ToList().Skip(10).Take(5); //console output : 0..99
|
|
output.Count();
|
|
}
|
|
}
|
|
|
|
IEnumerable<int> GetFooData()
|
|
{
|
|
for (int i = 0; i < 100; i++)
|
|
{
|
|
Console.WriteLine(i);
|
|
yield return i;
|
|
}
|
|
} |