Console.Out : Console « System « C# / C Sharp by API






Console.Out

    

 
using System; 
 
class MainClass { 
  public static void Main() { 
    int a=10, b=0; 
    int result; 
 
    Console.Out.WriteLine("This will generate an exception."); 
    try { 
      result = a / b; // generate an exception 
    } catch(DivideByZeroException exc) { 
      Console.Error.WriteLine(exc.Message); 
    } 
  } 
}

   
    
    
    
  








Related examples in the same category

1.Console.BackgroundColor
2.Console.Beep()
3.Console.Beep(200, 300)
4.Console.BufferHeight
5.Console.BufferWidth
6.Console.Clear()
7.Console.CursorLeft
8.Console.CursorSize
9.Console.CursorTop
10.Console.CursorVisible
11.Console.ForegroundColor
12.Console.In
13.Console.Read()
14.Console.ReadLine()
15.Console.ResetColor()
16.Console.SetOut
17.Console.SetWindowSize
18.Console.Title
19.Console.Write
20.Console.WriteLine