|
|
C#
List<string> strList1 = new List<string>
{
"Jack", "And", "Jill", "Went", "Up", "The", "Hill"
};
List<string> strList2 = new List<string>
{
"Jack", "And", "Jill", "Went", "Down", "The", "Hill"
};
bool result = strList1.SequenceEqual(strList2);
VB.NET
Dim strList1 As List(Of String) = New List(Of String)(New String() _
{"Jack", "And", "Jill", "Went", "Up", "The", "Hill"})
Dim strList2 As List(Of String) = New List(Of String)(New String() _
{"Jack", "And", "Jill", "Went", "Down", "The", "Hill"})
Dim result As Boolean = strList1.SequenceEqual(strList2)
Remember that this search is case sensitive!
'Like' us on our FaceBook page if you find this blog useful. Thanks!
Did you like this post?
|
|
|
||
|
|
|
|
Save on Delicious |
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |





comments
3 Responses to "Compare Two List of Strings in C# and VB.NET"Thank You.
muchas gracias estaba buscando esto, me ha sido de mucha ayuda
I was spending more than 4 hours for this and finally solved with a simple approach. THank you so much.
Post a Comment