Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# group array based on first character

Select().GroupBy(x => x.Name.Substring(0,1).ToUpper(), 
        (alphabet, subList) => new { 
          Alphabet = alphabet, 
          SubList = subList.OrderBy(x => x.Name).ToList() 
        }).OrderBy(x => x.Alphabet);
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to make a block disappear in unity 
Csharp :: unity draw waypoints path 
Csharp :: c# json 
Csharp :: C# webclient submit form 
Csharp :: monogame button 
Csharp :: how to find length of list c# 
Csharp :: unity reload active scene 
Csharp :: unity basic public options 
Csharp :: change color unity over time 
Csharp :: C# show text in another form 
Csharp :: adding additional parameter to form submit 
Csharp :: request a pricipal permission 
Csharp :: stop playing audiosource 
Csharp :: c# enum get string value 
Csharp :: c# if statement no braces 
Csharp :: reference a class by string unity 
Csharp :: unity for loop array 
Csharp :: C# how to know if number is even or odd 
Csharp :: .net core copy file in folder to root 
Csharp :: c# timer single tick 
Csharp :: C# Change color 
Csharp :: dataset empty check C# 
Csharp :: c# faker 
Csharp :: c# split string 
Csharp :: install active directory windows server 2019 powershell 
Csharp :: get xml from url 
Csharp :: triangle calculator 
Csharp :: c# webclient vs httpclient 
Csharp :: C3 compare hour 
Csharp :: unity get quaternion z 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =