Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
WhereEnumerator
using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { List<int> ints = new List<int> { 5,2,1,4,6}; var result = ints.WhereEnumerator(i => i > 3); foreach(var r in result) { Console.WriteLine(r); } } } public static class MyExtensions { public static IEnumerable<T> WhereEnumerator<T>(this IEnumerable<T> source, Predicate<T> predicate) { foreach(T s in source) { if (predicate(s)) { yield return s; } } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Ternary Operator
Problem: binary
Fórum ➡ Finding STRONG tags that contain UL tags, using Regex class♦
a6
6
Collections
radix sort
Math 10.94 test
4.4.20
Determine if Two Words Are Anagrams of Each Other
Please log in to post a comment.