partial class StaticAssert
	byte a = RenderQuality.Low < RenderQuality.Medium ? 0 : -1;
	byte b = RenderQuality.Medium < RenderQuality.High ? 0 : -1;

Apparently ?: is being folded at compile time, resulting in the following error if the constant expression before it evaluates to false:

Constant value '-1' cannot be converted to a 'byte'

I use partial class to prevent collisions with multiple static asserts in the same namespace, although you will still have to come up with unique variable names.

Also, I’ve hidden my post about [tee’bet] to see if that will lift the blockade of my site in China.