1
Answer

convert from object to ObservableCollection

Resumurof

Resumurof

8y
317
1
Hi,
     Could anyone help me to convert from object to  ObservableCollection, sample code below
 
func1()
{
 
lvItems.ItemsSource = portNameLists;  //portNameLists is of type ObservableCollection getting assigned to listview object
CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(lvItems.ItemsSource);
view.Filter = func2;
 
 func2(object item)
{
   // here i need to convert item which is of type object to ObservableCollection
so that i can perform like 
item.Where(X => X.address == addr.Text) 
 
Answers (1)