Just as an example to check the usefulness of the Equals method:
Imports System.Threading
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim t1 As Thread
Dim t2 As Thread
t1 = New Thread(AddressOf Thread1Proc)
t2 = New Thread(AddressOf Thread2Proc)
t1.IsBackground = True
t2.IsBackground = True
t1.Start()
t2.Start()
'Ensure that the Equals method was not overridden by the thread class to check for value equality
'Also, check the .NET SDK for information on whether Equals() was overridden
Dim t3 As Thread
t3 = t1
Dim slot As LocalDataStoreSlot = t3.AllocateDataSlot()
t3.SetData(slot, 1)
'Check for equality between thread three and thread one
If t3.Equals(t1) Then
MessageBox.Show("Thread three equals thread one.", String.Empty)
Else
MessageBox.Show("Thread three does NOT equal thread one.", String.Empty)
End If
'Check for equality between thread two and thread one
If t2.Equals(t1) Then
MessageBox.Show("Thread two equals thread one.", String.Empty)
Else
MessageBox.Show("Thread two does NOT equal thread one.", String.Empty)
End If
End Sub
Private Sub Thread1Proc()
Do
'Nothing
Loop
End Sub
Private Sub Thread2Proc()
Do
'Nothing
Loop
End Sub
End Class
I encourage you to run this to see how things work.