codeaft@codeaft:~/csharp$ dotnet run
Unhandled exception. System.PlatformNotSupportedException: Thread abort is not supported on this platform.
at System.Threading.Thread.Abort()
at Program.<Main>$(String[] args) in /home/codeaft/csharp/Program.cs:line 3
codeaft@codeaft:~/csharp$
C# program to handle the PlatformNotSupportedException
Program.cs
try{Threadt=Thread.CurrentThread;t.Abort();}catch(PlatformNotSupportedException){Console.WriteLine("Some part of your code doesn't supported on this platform");}
Output
codeaft@codeaft:~/csharp$ dotnet run
Some part of your code doesn't supported on this platform
codeaft@codeaft:~/csharp$
Dear User, Thank you for visitng Codeaft. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.