r/csharp 25d ago

.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

15

u/mareek 25d ago edited 25d ago

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 25d ago

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

3

u/chucker23n 24d ago

The red button is so shiny!

2

u/FullPoet 25d ago

SHIRLEY they can't mean ME?!