While loop is using bool
values to determine if continue loop or exit loop
In Your example count
value is int
and this cause error/
Simple refactorig is this:
int count = 5;
while (count != 0 )
{
count--;
Console.WriteLine("Number : {0}", count);
}
Now when count value will by 0 it will break loop