kodingwindow@kw:~/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/kodingwindow/csharp/Program.cs:line 3
kodingwindow@kw:~/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
kodingwindow@kw:~/csharp$ dotnet run
Some part of your code doesn't supported on this platform
kodingwindow@kw:~/csharp$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.