Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Pizzas&Tuples&Golden-Medal
//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) { string hdr="(QTY, FLAVOR)\n"; PizzasList<int,string> xs=new PizzasList<int,string>(); xs.Add(3,"MARGHERITA");xs.Add(1,"BRASIL (OURO) 3×0 ITÁLIA");xs.Add(2,"MUSHROOM"); xs.Add(1,"Brasil (ouro) 3×0 Itália");xs.Add(3,"margherita");xs.Add(2,"mushroom"); xs.Sort(); // IMPORTANT FEATURE, FOR ***FREE*** foreach(var x in xs){Console.WriteLine(hdr+x);hdr=string.Empty;} // ToString(), another IMPORTANT FEATURE, ***FOR FREE*** } public class PizzasList<QTY,FLAVOR>:List<Tuple<QTY,FLAVOR>>{ public void Add(QTY i,FLAVOR s){Add(Tuple.Create(i,s));} } } }
run
|
edit
|
history
|
help
0
Testing list
Simple Selection Sort
count-letter-frequencies
HexaStringToFile
zicaC#
megha
olution to problem #2 from projecteuler.net
Guid Formatting Code Snippet
Chandramouli
Ejercicio bucles