private static bool IsZeroOnly (StringBuilder sb) { for (int i = 0; i < sb.Length; i++) if (char.IsDigit (sb [i]) && sb [i] != '0') return false; return true; }