mirror of
https://github.com/Smaug123/WoofWare.PawPrint
synced 2025-10-10 16:28:41 +00:00
Plumb method generics through zeroOf too (#37)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
<EmbeddedResource Include="sources\WriteLine.cs" />
|
||||
<EmbeddedResource Include="sources\InstaQuit.cs" />
|
||||
<EmbeddedResource Include="sources\Threads.cs" />
|
||||
<EmbeddedResource Include="sources\ResizeArray.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
18
WoofWare.PawPrint.Test/sources/ResizeArray.cs
Normal file
18
WoofWare.PawPrint.Test/sources/ResizeArray.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace HelloWorldApp
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static int Main(string[] args)
|
||||
{
|
||||
var l = new List<int>();
|
||||
l.Add(3);
|
||||
l.Add(100);
|
||||
var m = l.Select(x => x.ToString()).ToList();
|
||||
// 2 + 103 + (1 + 3) = 109
|
||||
return m.Count + l.Sum() + m.Select(x => x.Length).Sum();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user