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 Sort
- {
- class Sort
- {
- static void Main()
- {
- List<string> list = new List<string>();
- list.Add("pesho");
- list.Add("gosho");
- list.Add("stamat");
- list.Add("prokopii");
- list.Add("toshko");
- list.Add("unufrii");
- list.Add("pes");
- list = list.OrderBy(a => a.Length).ThenBy(a => a).ToList();
- Console.WriteLine(string.Join(" ",list));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment