Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
fun with yield return
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { IList<int> list = new List<int>(){1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; foreach(var i in Y(list)){ Console.WriteLine(i.ToString()+". Hello, world!"); } } public static IEnumerable<int> Y(ICollection<int> list){ foreach(var i in list){ if(i%2==0) yield return i; else yield return -1; } } } }
run
|
edit
|
history
|
help
0
sdfghyjtgfredx
Inheritance Gone Wrong Template
The abstract factory design pattern implemented in c# using generics.
Create HardwareConfigs
Comp 3
jjj2
Found many section of times intersect (can edit)
Ty
Side1-2
eryjuyhtgrfesdsadcfg