Click or drag to resize

EnumerableExtensionsHasSameValuesT Method

Determine if 2 lists hold the same values. The values may be held in any order as long as they are the same in count and value.

Namespace:  TestHelperExtensions
Assembly:  CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntax
public static bool HasSameValues<T>(
	this IEnumerable<T> list1,
	IEnumerable<T> list2
)

Parameters

list1
Type: System.Collections.GenericIEnumerableT
The initial list of values
list2
Type: System.Collections.GenericIEnumerableT
The list of values to compare to

Type Parameters

T
Any comparable data type

Return Value

Type: Boolean
True if the lists contain the same values, false if the lists differ in count or values.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also