Environment ProcessorCount Property gets the number of processors on the current machine
Imports System Class Sample Public Shared Sub Main() Console.WriteLine("The number of processors on this computer is {0}.",Environment.ProcessorCount) End Sub End Class