How can i cast into a ObservableCollection<object>

Mario Binder picture Mario Binder · Jul 29, 2009 · Viewed 20.7k times · Source

How can i cast

from ObservableCollection<TabItem> into ObservableCollection<object>

this doesnt work for me

(ObservableCollection<object>)myTabItemObservableCollection

Answer

Arsen Mkrtchyan picture Arsen Mkrtchyan · Jul 29, 2009

you should copy like this

return new ObservableCollection<object>(myTabItemObservableCollection);