Question

For many classes in the .NET frameworks, MSDN describes thead safety as:

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

How is that implemented? is there a syntactic sugar that happens there? or is it implemented inside the class in some way?

Thanks.

Was it helpful?

Solution

That is just an implementation detail of those classes. It just means that the developers for those static methods took care of any thread-safety issues.

It is not a language or framework feature that static methods are thread-safe.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top