Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# find duplicates in list of strings

var list = new List<string>();
list.GroupBy(n => n).Any(c => c.Count() > 1);
Comment

c# see if list contains any duplicates

var list = new List<string>();

// Fill the list

if(list.Count != list.Distinct().Count())
{
     // Duplicates exist
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: webclient timeout 
Csharp :: Unity Interstitial ad C# 
Csharp :: c# execute shell command 
Csharp :: c# decimal vs double 
Csharp :: c# if statement 
Csharp :: read file using c# 
Csharp :: Customize yup number 
Csharp :: get property value from object c# 
Csharp :: get user startup folder path C# 
Csharp :: system linq c# 
Csharp :: unity cancel momentum 
Csharp :: or in if statement c# 
Csharp :: find how many digits a number has csharp 
Csharp :: on collision enter by layer 2d unity 
Csharp :: .net core partial view with model 
Csharp :: unity class 
Csharp :: c# datagridview select row right click 
Csharp :: How to find out if a file exists in C# / .NET? 
Csharp :: how to remove all whitespace from a string in c# 
Csharp :: is number c# 
Csharp :: how to close a form c# 
Csharp :: add row and columns to grid wpf in code 
Csharp :: pyautopgui erros 
Csharp :: c# code skripte kommunizieren 
Csharp :: data annotations in asp.net core 
Csharp :: c# funtion 
Csharp :: primitive types c# 
Csharp :: print a file from C# 
Csharp :: get int value from enum c# 
Csharp :: wpf listview with columns binding 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =