1
0
mirror of synced 2024-11-16 14:53:50 +00:00
Tapeti/Helpers/ConsoleHelper.cs

23 lines
541 B
C#
Raw Normal View History

2016-12-11 14:08:58 +00:00
using System;
namespace Tapeti.Helpers
{
public static class ConsoleHelper
{
// Source: http://stackoverflow.com/questions/6408588/how-to-tell-if-there-is-a-console
public static bool IsAvailable()
{
try
{
// ReSharper disable once UnusedVariable - that's why it's called dummy
var dummy = Console.WindowHeight;
return true;
}
catch
{
return false;
}
}
}
}