 | 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
Syntaxpublic static bool HasSameValues<T>(
this IEnumerable<T> list1,
IEnumerable<T> list2
)
<ExtensionAttribute>
Public Shared Function HasSameValues(Of T) (
list1 As IEnumerable(Of T),
list2 As IEnumerable(Of T)
) As Boolean
public:
[ExtensionAttribute]
generic<typename T>
static bool HasSameValues(
IEnumerable<T>^ list1,
IEnumerable<T>^ list2
)
[<ExtensionAttribute>]
static member HasSameValues :
list1 : IEnumerable<'T> *
list2 : IEnumerable<'T> -> bool
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:
BooleanTrue 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