C# thankfully was designed by someone that appreciates type systems, maybe you should revisit it.
func f(x StatusCode) {
}
f(728347) // There's no such status. Whateverz, no compile error. f(728347) // There's no such status. Whateverz, no compile error.
a := 728347
f(a) // Compile error.