Как привести объект AlfaTimeFrames к TimeSpan значению? watashi 19 August 2011 · 1 min read · 842 views 1 Share AlfaDirect Как привести объект AlfaTimeFrames к TimeSpan значению? Спасибо.
Comments (4)
Comments on this topic are locked
В классе AlfaTimeFrames есть перегруженный оператор приведения типа:
_timeFrame = (TimeSpan)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; 👍
_timeFrame = (TimeSpan)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; 👎 _timeFrame = (TimeSpan)(AlfaTimeFrames)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; 👍
Вероятно, приведение к ComboBoxItem можно убрать.