score:1
Accepted answer
public override bool equals(object other)
{
if(!(other is myobject))
{
return false;
}
var o = other as myobject;
return mystring.equals(o.mystring) && myint == o.myint;
}
score:1
var newdict = dict1.except(dict2, new myobjectcomparer());
Source: stackoverflow.com
Related Query
- Using Except on Dictionaries with Object as Value
- Using LINQ, how do I find an object with a given property value from a List?
- Using LINQ to get all object with the same value property?
- C# Using LINQ to filter each Object with Max Value in List of Objects
- How to get a an object in list with min field value using linq?
- How to use LINQ to select object with minimum or maximum property value
- How to perform .Max() on a property of all objects in a collection and return the object with maximum value
- How to find item with max value using linq?
- How to handle NULL object property with FirstOrDefault using Linq
- How to get distinct with highest value using Linq
- select object which matches with my condition using linq
- Using LINQ's Zip with a closure that doesn't return a value
- Getting object with max date time value in one of it's properties
- Using Lambda with Dictionaries
- Problem with LINQ to Entities query using Sum on child object property
- How to find the maximum value for each key in a List of Dictionaries using LINQ?
- Using Linq Except with two lists of int arrays
- Select all rows with distinct column value using LINQ
- DataTable: Get Max Value Using LINQ With Criteria Field (GroupBy)
- Using an IEqualityComparer with a LINQ to Entities Except clause
- Get Except of multiple nested dictionaries using LINQ expression
- Custom object using Except failing to use IEqualityComparer<T>
- Compare items in different dictionaries with same key using LINQ
- Find object with in class using LINQ
- C# - using value twice within object initialiser
- I am trying create a new list of users from a list of users who have not created an additional object with a certain property using LINQ
- Issue with the string value "Boolean" using HtmlHelper DisplayFor
- Linq: Convert list of object to dictionary, with an object member as value
- Return record with max column value using Entity Framework 6
- Return list with more than one value stored in a dictionary using linq
More Query from same tag
- Intersection of two heterogeneous list in C#
- Index duplicates from the list using Linq
- Updating XmlDocument using linq (possibly)
- Compile time Type declaration without using dynamic in C#
- Linq to Entities delete
- Can't do multiple groups in MongoDB C# Driver
- Scala collection-like SQL support as in LINQ
- Different DataContext error. Why is this a problem?
- Pull field from another table in MVC
- Linq (or SQL): Get a search query and sort it order by best result
- How do I build an expression to call an equality operator from a base class?
- Passing Parameters from View to Action in MVC
- Count how many cells are null in a row using Linq and c#
- Comparing collections and counting duplicates using LINQ and C#
- Linqpad - Save Changes works without Linq To Entiies Database Context
- LINQ select query with Anonymous type and user Defined type
- Managing Blank field from Linq Query
- Implementing a "like" operator multiple times in one Linq to Entities query
- How to query and sort by filtered Max query in EF4?
- Sum Node values using LINQ to XML
- Split string into list of N-length strings using LINQ
- Left join to a table which may or not contain the data
- how to force sqlmetal to keep field name case?
- Simple Linq to XML Query Doesn't Work
- querying datatable using linq and c#
- Linq UNION query to select two elements
- How to get this linq query to access info from the previous row
- Specified method is not supported when using Count() in Linq with Nhibernate
- How to use LINQ to group by and order by certain column
- one2many relation, get parent with child