diff --git a/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/Project.vbproj b/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/Project.vbproj new file mode 100644 index 0000000000000..83169bda1fc9d --- /dev/null +++ b/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/Project.vbproj @@ -0,0 +1,8 @@ + + + + Library + net9.0 + + + diff --git a/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/source2.vb b/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/source2.vb index 59313de2e2428..70a8c76dbf4b7 100644 --- a/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/source2.vb +++ b/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/source2.vb @@ -42,7 +42,7 @@ Public class Simple + "starting the new InstanceCaller thread.") ' Create the thread object, passing in the - ' serverObject.SharedMethod method using a + ' ServerClass.SharedMethod method using a ' ThreadStart delegate. Dim SharedCaller As New Thread( _ New ThreadStart(AddressOf ServerClass.SharedMethod)) @@ -56,9 +56,9 @@ Public class Simple End Class ' The example displays output like the following: ' The Main() thread calls this after starting the new InstanceCaller thread. -' The Main() thread calls this after starting the new StaticCaller thread. -' ServerClass.StaticMethod is running on another thread. +' The Main() thread calls this after starting the new SharedCaller thread. +' ServerClass.SharedMethod is running on another thread. ' ServerClass.InstanceMethod is running on another thread. ' The instance method called by the worker thread has ended. -' The static method called by the worker thread has ended. +' The shared method called by the worker thread has ended. ' diff --git a/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/source4.vb b/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/source4.vb index d0f2666f287de..93cb8cc79d271 100644 --- a/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/source4.vb +++ b/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Threading.ThreadStart2/VB/source4.vb @@ -1,10 +1,10 @@ ' Imports System.Threading -' The ThreadWithState class contains the information needed for +' The ThreadWithState2 class contains the information needed for ' a task, the method that executes the task, and a delegate ' to call when the task is complete. -Public Class ThreadWithState +Public Class ThreadWithState2 ' State information used in the task. Private boilerplate As String Private numberValue As Integer @@ -34,13 +34,12 @@ Public Class ThreadWithState End Class ' Delegate that defines the signature for the callback method. -' Public Delegate Sub ExampleCallback(lineCount As Integer) -Public Class Example +Public Class Example2 Public Shared Sub Main() ' Supply the state information required by the task. - Dim tws As New ThreadWithState( _ + Dim tws As New ThreadWithState2( _ "This report displays the number {0}.", _ 42, _ AddressOf ResultCallback)