Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace SortingStringInList
- {
- class SortingStringsInList
- {
- static void Main()
- {
- List<string> names = new List<string>()
- {
- "Pesho","Ivo","Michael","Jack","Lora"
- };
- Console.WriteLine(string.Join(", ",names));
- names.Sort();
- // names.Reverse();
- Console.WriteLine(string.Join(", ",names));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment