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 :: C# .net core convert string to enum 
Csharp :: c# read binary file 
Csharp :: get time from datetime c# 
Csharp :: unity normalize float 
Csharp :: unity rotation 
Csharp :: how to set up blender with unity units 
Csharp :: deserialize object to dictionary c# 
Csharp :: c# messagebox yes no "wpf" 
Csharp :: .net Core Return File like File Server 
Csharp :: how to move a gameobject to another object 
Csharp :: c# get set value 
Csharp :: movement unity 
Csharp :: C# How to read users input and display it 
Csharp :: c# do while loop 
Csharp :: how to set the frame rate unity 
Csharp :: dota2 
Csharp :: top down movement unity 
Csharp :: c# unity get name of object 
Csharp :: vb.net console log 
Csharp :: c# string remove 
Csharp :: system.windows.forms not found 
Csharp :: unity c# check how many of an object exists 
Csharp :: .net mvc decimal displayformat currency 
Csharp :: what does static mean in c# 
Csharp :: unity raycast 2d 
Csharp :: c# dictionary add 
Csharp :: clear gridview data in c# 
Csharp :: c# int to string 
Csharp :: difference between class and struct in c# 
Csharp :: c# get application root path directory 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =