This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Main() | |
| { | |
| var list1 = Enumerable.Range(0, 10000).Select(i => i.ToString()); | |
| var list2 = Enumerable.Range(0, 10000).Select(i => i.ToString()); | |
| var list3 = Enumerable.Range(0, 10000).Select(i => i.ToString()); | |
| // First run to avoid JIT during the benchmark | |
| list1.ZipOne(list2, list3, Merge).Count(); | |
| list1.ZipTwo(list2, list3, Merge).Count(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ThemeInfo | |
| { | |
| private readonly string _themeName; | |
| private readonly string _themeColor; | |
| private readonly string _themeSize; | |
| private readonly string _themeFileName; | |
| public ThemeInfo(string name, string fileName, string color, string size) | |
| { | |
| _themeName = name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class Sequence | |
| { | |
| public static IEnumerable<T> Memoize<T>(this IEnumerable<T> sequence) | |
| { | |
| return new MemoizedSequence<T>(sequence); | |
| } | |
| } | |
| // This code is for illustration and is not production-ready. |
NewerOlder