我想知道:这两个版本在性能方面的最佳说明是什么:
Background = Application.Current.Resources[condition ? BackgroundName1 : BackgroundName2] as Brush;
还有:
Background = condition ? Application.Current.Resources[BackgroundName1] as Brush : Application.Current.Resources[BackgroundName2] as Brush;
有什么区别吗?如果是的话,哪一个更好?
谢谢
注意:背景名称1&2只是字符串