Ask coding questions

← Back to all posts does not support System.UI namespace in C#?
AmirBayramaliev (0)

Error message from compiler:

Mono C# compiler version
 mcs -out:main.exe main.cs
main.cs(2,14): error CS0234: The type or namespace name UI' does not exist in the namespaceSystem'. Are you missing an assembly reference?
main.cs(4,13): error CS0246: The type or namespace name TextWriter' could not be found. Are you missingSystem.IO' using directive?

SixBeeps (5067)

There's a few reasons why it shouldn't work.

  • is a terminal-based site. There is no UI involved.
  • System.UI doesn't even exist.
    • If you meant to use Windows.UI, you can't because runs on Linux.
AmirBayramaliev (0)

@niorg2606 I understand that GUI-related classes should not work here, but I expected it to be able to play with some IO stream classes like TextWriter.

Thanks for reply.

SixBeeps (5067)

@AmirBayramaliev TextWriter uses System.IO, not System.UI

abc3354 (224)

Hi !

I never worked with C#, but If something is missing try or

If you want to use graphical things on C#, ask on the feeback board