According to this StackOverflow question, one can use the Type.IsAbstract and Type.IsSealed properties to determine if a class is static. However, look at the following test:
[Fact]
public void ActivatorNotAbstract()
{
var activatorType = typeof(Activator);
Assert.True(activatorType.IsClass);
Assert.True(activatorType.IsSealed);
Assert.True(activatorType.IsAbstract);
}
This test fails because the last assertion is not true, although System.Activator is defined as a static class. This is both true for .NET Core 2.0 (and probably previous versions) as well as .NET 4.5 (and probably other versions, too). You can also find the above test in this GitHub repo.
Why is Activator special in this regard? I couldn't find any other static class in the BCL that would behave this way.
Edit after answer from Camilo
You are right, I didn't look thoroughly - in .NET, the class is actually sealed:
However, from .NET Core Metadata, it appears to be static:
Now, the actual question should be: why appears Activator as a static class in .NET Core (and in NetStandard, too, btw.), but actually is a sealed class?

