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 447009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:31:39+00:00 2026-05-12T21:31:39+00:00

Take the following C# file, the simplest possible repro of my problem: using System;

  • 0

Take the following C# file, the simplest possible repro of my problem:

using System;
using System.IO;

public static class Test
{
    public static void Main(string[] args)
    {
        string line;
        while ((line = Console.In.ReadLine()) != null)
        {
            Console.Out.WriteLine(line);
        }
    }
}

When I build this under mono and run it on the console, everything works fine except that I can’t send EOF. Typing CTRL-D just puts a weird character on the command line. I think that I’m checking for EOF the wrong way, but Console.In is a TextReader, which doesn’t have the EndOfFile property. How can I fix this?

  • 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-12T21:31:40+00:00Added an answer on May 12, 2026 at 9:31 pm

    Which version of mono? I fixed that problem in r129444 in 2009-03-16… Your program runs as expected when I press Ctrl-D.

    Update: Nice. I found out that 2.4.x.y versions don’t have the fix :-(. It will be in the upcoming 2.6 version… Sorry about that.
    Update 2: mono-2-4 was branched on 2009-03-13. I missed it by 3 days!

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

Sidebar

Related Questions

Take the following simple source (name it test.cpp): #include <windows.h> void main() { DebugBreak();
Take the following example, I have a class public class SomeItem { public string
Take the following property: public string Foo { get; private set; } Using reflection,
I write the following file temp.hs: import qualified Data.Set import System.Environment main :: IO
I need help debugging some odd file behavior in Python. Take the following script
Let's take for example a single file committed in CVS with the following history.
Take the following naive implementation of a nested async loop using the ThreadPool: ThreadPool.SetMaxThreads(10,
Take the following : #include <stdio.h> main() { unsigned long long verybig = 285212672;
I am using Apache 2.2 and mod_rewrite. I would like to take the following
Take the following contents of a file: 52245 528 06156903 52246 530 00584709 What

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.