mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-16 02:02:51 -07:00
Use is operator instead of as + null check (#1911)
This commit is contained in:
parent
b895f5bcea
commit
788dfc7726
8 changed files with 27 additions and 56 deletions
|
@ -368,8 +368,7 @@ namespace CalculatorApp
|
|||
return;
|
||||
}
|
||||
|
||||
var item = (e.SelectedItemContainer as MUXC.NavigationViewItem);
|
||||
if (item != null)
|
||||
if (e.SelectedItemContainer is MUXC.NavigationViewItem item)
|
||||
{
|
||||
Model.Mode = (ViewMode)item.Tag;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue