[Mono-dev] Using console with embedded mono runtime

Bartosz Przygoda thechives at gmail.com
Tue Nov 20 19:02:54 UTC 2012

Yes, this was it, simple as that.

Many thanks!

now, off to play with awesome REPL:)
From: Robert Jordan
Sent: 20/11/2012 18:40
To: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] Using console with embedded mono runtime
On 20.11.2012 14:23, Bartosz Przygoda wrote:
> Hi,
> My scenario is windows app hosting mono3.0.1 runtime. I wanted to add REPL
> functionality, so I've used AllocConsole to open console window. However,
> calls to Console static methods do not produce any result, as if

Try this:

Console.SetOut(new StreamWriter(Console.OpenStandardOutput()));
Console.SetError(new StreamWriter(Console.OpenStandardError()));
Console.SetIn(new StreamReader(Console.OpenStandardInput()));

This should reset the console streams in the context of the
newly allocated console.


Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com

More information about the Mono-devel-list mailing list