Can anyone explain me why the following Infinite loop takes a lot of CPU usage (CPU usage has increased upto 50% if total core is 2 and 100% if total CPU core is just 1
)
But if I un-comment the line it reduces to 1 or 2 CPU usage?
public class Program
{
public static void Main(string[] args)
{
while (true)
{
//Console.WriteLine("hello..");
}
}
}