Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
List_methods
//Title of this code //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 Display(List<string> lst) { int i = 1; foreach (string st in lst) { Console.WriteLine("#" + i + ": " + st); i++; } } public static void Main(string[] args) { List<string> lst=new List<string>(); lst.Add("Jhon Player"); lst.Add("Flying Machine"); lst.Add("Peter England"); lst.Add("Pan America"); lst.Add("Tommy Hillfeigher"); lst.Add("Zovi"); lst.Add("Puma"); lst.Add("Adidas"); lst.Add("Woodland"); lst.Add("Nike"); lst.Add("Sparx"); lst.Add("Lotto"); lst.Add("Filla"); lst.Add("Bata"); lst.Add("Lunars"); Display(lst); lst.Sort(); Console.WriteLine("********************************************\n sorted List\n"); Display(lst); Console.WriteLine("********************************************\n Binary Search for 'Nike'\n"); Console.WriteLine("'Nike' is located at index:"+(lst.BinarySearch("Nike")+1)); Console.WriteLine("********************************************\n Reversed List \n"); lst.Reverse(); Display(lst); Console.ReadLine(); } } }
run
|
edit
|
history
|
help
0
Сортировка массива
TesteSwitch
7. Asynchrony
2
UINT32toHEX
D19
Fibonacci with Given Length
Delegaty Func
Min max elements swap of the array
Huy kaka