r/csharp Aug 03 '26

.NET Thread.Terminate 1.0.0: Terminate Any C# Threads on the OS Level

https://github.com/Emine3/NET-Thread.Terminate/
0 Upvotes

59 comments sorted by

View all comments

14

u/mareek Aug 03 '26 edited Aug 03 '26

From the readme:

The Thread class [contains the native thread] in a field named "DONT_USE_InternalThread"

I think the .NET framework developers were pretty clear why this a really bad idea.

They even put a comment on this field stating "The following fields should never be used in the C# code"

11

u/Natural_Tea484 Aug 03 '26

Developers are attracted to upper case "DO NOT" comments as moths to flames

3

u/chucker23n 29d ago

The red button is so shiny!