浏览代码

Use discard in TryGetResource.

Steven Kirk 8 年之前
父节点
当前提交
1cf3e6bfc6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      samples/ControlCatalog/MainWindow.xaml.cs

+ 1 - 1
samples/ControlCatalog/MainWindow.xaml.cs

@@ -19,7 +19,7 @@ namespace ControlCatalog
             // so we must refer to this resource DLL statically. For
             // so we must refer to this resource DLL statically. For
             // now I am doing that here. But we need a better solution!!
             // now I am doing that here. But we need a better solution!!
             var theme = new Avalonia.Themes.Default.DefaultTheme();
             var theme = new Avalonia.Themes.Default.DefaultTheme();
-            theme.TryGetResource("Button", out var button);
+            theme.TryGetResource("Button", out _);
             AvaloniaXamlLoader.Load(this);
             AvaloniaXamlLoader.Load(this);
         }
         }
     }
     }