TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
SequenceEqual LINQ Method
Nemilidinne Ashokreddy
Jan 09
2016
Code
1.4
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
using
System;
using
System.Linq;
namespace
ConsoleApplication1
{
class
Program
{
static
void
Main(
string
[] args)
{
string
[] names1 = {
"sample1"
,
"sample1"
,
"sample1"
};
string
[] names2 = {
"sample1"
,
"sample1"
,
"sample1"
};
string
[] names3 = {
"sample1"
,
"sample1"
,
"sample1"
};
bool
result =
new
[]
{
names2,
names1
}.All(names1.SequenceEqual);
Console.WriteLine(result);
Console.ReadLine();
}
}
}
Linq
SequenceEqual method in LINQ
Check equality of more than 2 collections