Ā© 2026 Hedgehog Software, LLC
bool MyMethod([NotNullWhen(true)]out MyClass? myInstance) { ... } var isNull = MyMethod(out var myInstance); if (!isNull) throw; myInstance.Blip();
myInstance could be null dude!
NotNullWhen