namespace E { public class Program { public static void Main(string[] args) { Thread t = new Thread(new ParameterizedThreadStart(Print)); t.Start(123); t.Join(); Console.ReadKey(); } public static void Print(object v) { Console.WriteLine("v=" + (int)v); } } }
og:
Imports System Imports System.Threading
Namespace E Public Class Program Public Shared Sub Main(ByVal args As String()) Dim t As New Thread(New ParameterizedThreadStart(AddressOf Print)) t.Start(123) t.Join() Console.ReadKey() End Sub Public Shared Sub Print(ByVal v As Object) Console.WriteLine("v=" & CType(v, Integer)) End Sub End Class End Namespace
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.