troubleshooting Question

Hashtable -> Get all keys that have the same value

Avatar of MrFawlty
MrFawltyFlag for Belgium asked on
.NET ProgrammingVisual Basic.NET
6 Comments1 Solution844 ViewsLast Modified:

I have a hashtable hstAllDeps where keys are Guids and the value is a list(Of Guid). I need to be able to get a List(Of Guid) containing all keys that have the same list(Of Guid) as value.

How can I do this?

Kind Regards,

Private Function AreTheSameListsOfGuids(ByVal lstGuids1 As List(Of Guid), ByVal lstGuids2 As List(Of Guid)) As Boolean
		Dim blnresult As Boolean
		Dim intCount As Integer = 0
		If lstGuids1 IsNot Nothing AndAlso lstGuids2 IsNot Nothing Then
			If lstGuids1.Count = lstGuids2.Count Then
				For Each guiElement1 As Guid In lstGuids1
					For Each guiElement2 As Guid In lstGuids2
						If Not guiElement1.Equals(guiElement2) Then
							intCount += 1
						End If
			End If
		End If
		If intCount > 0 Then
			blnresult = True
		End If
		Return blnresult
	End Function
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros