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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 153k
  • Answers 153k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Edit: Since your element is dynamically inserted, you have to… May 12, 2026 at 10:16 am
  • Editorial Team
    Editorial Team added an answer Hmmm... I think you'd better look at dependency properties value… May 12, 2026 at 10:16 am
  • Editorial Team
    Editorial Team added an answer I suspect this isn't a technical problem at all. I… May 12, 2026 at 10:16 am

Related Questions

I am trying to write a fragment program that will take a texture and
I am trying to figure out PyObjC on Mac OS X, and I have
I am trying to create an interactive command line program and it seems that
This is driving me nuts. I have been at it for over 2 hours

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.