UPDATE: Okay so the correct syntax, assuming you have a variable
B3? b;
and B3 is a value type such as a struct, is
if (b is B3 _b) {
// Non-null variable named _b now exists
}
However I also just in replies learned something WILD, which is if you don't remember or don't want to type the name of B3, you can just type
if (b is { } _b) {
// Non-null variable named _b now exists
}
and the compiler accepts that just fine and does the right thing. What on *earth*. C# is simply too big