Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 227959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:38:32+00:00 2026-05-11T19:38:32+00:00

I am trying to figure out why a program I am working on goes

  • 0

I am trying to figure out why a program I am working on goes in to “not responding” mode when I ask it to output a large amount of characters to the console it is running in.

I tried creating a small example that just prints out characters, and this will indeed also go “not responding” on me after some 10-20 seconds:

static void Main(string[] args)
{
    for (int i = 0; i < 255; i = (i+1) % 255)
    {
        Console.Write(((char)i));

    }
}

The program is still running though, even though the console window is “not responding”, I can still pause the debugger and continue it, but the console window is broken.

The thing is, the console do not mind spitting out an endless amount of integers:

static void Main(string[] args)
{
    for (int i = 0; i < 255; i = (i+1) % 255)
    {
        Console.Write(i);            
    }
}

Any ideas is much appreaciated. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:38:32+00:00Added an answer on May 11, 2026 at 7:38 pm

    Well it will spew out a lot of nonsense (and beep a lot, unless you mask out character 7, which is a bell) but it never becomes unresponsive for me.

    It will depend on how your console handles control characters though – which console are you using, on which operating system and with which language?

    Moreover, why do you want to send unprintable characters to the console? If you keep your loop to ASCII (32-126) what happens? For example:

    using System;
    
    class Test
    {   
        static void Main(string[] args)
        {
            int i=32;
            while (true)
            {
                Console.Write((char)i);
                i++;
                if (i == 127)
                {
                    i = 32;
                }
            }
        }
    }
    

    Does that still exhibit the same behaviour?

    You mention the debugger – do you get the same behaviour if you run outside the debugger? (I’ve only tested from the command line so far.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a drawing program and am trying to figure out the
I am working on my first NASM program, and while trying to figure out
I am working an OS program and I am trying to figure out how
I am trying to figure out how to get the program to create a
I'm trying to figure out a way to make demos for a program I've
I am working on a homework assignment and I'm trying to figure out a
I'm new to Java, and trying to figure out how to structure my program's
Hello I am writing this program, and I am trying to figure out how
I have a problem I cant seem to figure out. Working in Django trying
Trying to figure out how to do this. I have the style but I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.