.NET Daily

C#

How to compare two list of items in C#

Posted on .

How to compare two list of items in C#

Introduction

If you want to compare two list of items in C# you can’t just use the equal sign or a loop through elements, you should use Enumerable.SequenceEqual method. For example:

You should not worry about the performance, LINQ has a pretty good algorithm for that.

Darius

Darius

Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.

There are no comments.

View Comments (0) ...
Navigation