Ejemplo n.º 1
0
 /// <summary>
 /// Sets the current attribute (foreground and background colors) to be used when
 /// writing characters.
 /// </summary>
 /// <param name="attr">The desired output attribute.</param>
 public void SetTextAttribute(ConsoleCharAttribute attr)
 {
     if (!WinCon.SetConsoleTextAttribute(_handle, attr))
     {
         throw new ApplicationException("Unable to set text attribute");
     }
 }