问题
I'm currently working on some fancy console app. I'm using .Net Core 2.1. It was all fine, when I was working on Windows, but then I wanted to test it on Linux and use that glorious "cross-platform". To be specyfic I was using that:
System.Console.SetWindowSize();
And them...
Exception has occurred: CLR/System.PlatformNotSupportedException
An unhandled exception of type 'System.PlatformNotSupportedException' occurred in System.Console.dll: 'Operation is not supported on this platform.'
at System.ConsolePal.SetWindowSize(Int32 width, Int32 height)
So... Yeah System.PlatformNotSupportedException
. Not so "cross-platform". But I was using some win console API etc. My question is:
Is there any workaround or some 3rd party lib, which will work on Linux? Or maybe I'm should use in diffrent?
来源:https://stackoverflow.com/questions/53894813/how-to-use-console-setwindowsize-on-linux-using-net-core