I am working on Problem 14 on Project Euler, and my code seems to freeze at random intervals for no apparent reason.
static void Main() { int maxNum = 0;
If goes into infinite loop in while (num != 1).
while (num != 1)