Why is typeA == typeB slower than typeA == typeof(TypeB)? Languages

Why is typeA == typeB slower than typeA == typeof(TypeB)?

I've been optimising/benchmarking some code recently and came across this method:This is called from a performance critical loop elsewhere, so I naturally assumed all those typeof(...) calls were adding unnecessary overhead (a micro-optimisation, I know) and could be moved to private fields within the class. (I'm aware there are better...
Read More
What does null! statement mean? Languages

What does null! statement mean?

I've recently seen the following code:Basically I try to dig into new c# 8 features. One of them is NullableReferenceTypes. Actually there're a lot of articles and information about it already. E.g. this article is quite good. But I din't find any information about this new statement null! Can someone...
Read More