 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Getting the Standard Output and Standard Error Output Stream through Console in C#
To get the standard output stream through Console, the code is as follows −
Example
using System; public class Demo {    public static void Main(string[] args){       Console.WriteLine("Standard Output Stream = "+Console.Out);    } }  Output
This will produce the following output −
Standard Output Stream = System.IO.TextWriter+SyncTextWriter
Example
To get the standard error output stream through Console, the code is as follows −
using System; public class Demo {    public static void Main(string[] args){       Console.WriteLine("Standard Output Stream = "+Console.Out);       Console.WriteLine("Standard Error Output Stream = "+Console.Error);    } }  Output
This will produce the following output −
Standard Output Stream = System.IO.TextWriter+SyncTextWriter Standard Error Output Stream = System.IO.TextWriter+SyncTextWriter
Advertisements
 