Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# distinct array of objects by values

var uniquePersons = persons.GroupBy(p => p.Email)
                           .Select(grp => grp.First())
                           .ToArray();
Comment

how to get unique list in c#

using(var dataModel = new DataModel())
{
  var classes = dataModel.Attributes.Where(a => a.Field == "Class").Select(a => a.Key).Distinct().ToList();
}
Comment

c# get distinct values all fields from list

if (!IsPostBack) {  
       GridView1.DataSource = GetProducts()
                              .GroupBy(o => new { o.Make, o.Model })
                              .Select(o => o.FirstOrDefault());
       GridView1.DataBind();
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: recursively reverse linked list 
Csharp :: linq datatable 
Csharp :: c# split large file into chunks 
Csharp :: set file to read only C# 
Csharp :: list sort c# 
Csharp :: set the page that FormsAuthentication.RedirectFromLoginPage redirects to 
Csharp :: unity 2d enemy patrol script 
Csharp :: get ad user using email address microsoft graph C# 
Csharp :: convert c# string to int 
Csharp :: distance between two objects unity 2d 
Csharp :: concat arrays .net 
Csharp :: c# async constructor 
Csharp :: new list/array with values c# 
Csharp :: update table in C# 
Csharp :: center mouse unity 
Csharp :: c# map function 
Csharp :: How to use the protected keyword in C# 
Csharp :: c# check characters in string 
Csharp :: how to set a tag in asp net razor view stackoverflow 
Csharp :: stock span problem c# using class 
Csharp :: decimal operator in Convert.toDouble() C# 
Csharp :: Make UI/Canvas look at Camera always. 
Csharp :: how to make randomizer c# 
Csharp :: c# Case insensitive Contains(string) 
Csharp :: unity datetime to string 
Csharp :: cant see my classes in inspector 
Csharp :: unity array c# 
Csharp :: unity change fixed timestep in code 
Csharp :: c# array to label 
Csharp :: get gameobject layermask 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =