Skip to content

Instantly share code, notes, and snippets.

@mirmostafa
Created March 2, 2024 13:33
Show Gist options
  • Save mirmostafa/b712d46885e8d634d2b93bb4c73c2929 to your computer and use it in GitHub Desktop.
Save mirmostafa/b712d46885e8d634d2b93bb4c73c2929 to your computer and use it in GitHub Desktop.
Pattern Matching - Variable
bool? isOk = dbResult is not null and { Found: true, HasAccess: var hasAccess } ? has Access : null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment