Click here to Skip to main content
15,893,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a observable collection object, i wanna know about the divide the value to check the particular value is there or not.


private ObservableCollection<paymententity> BuildingList = new ObservableCollection<paymententity>();
Posted
Updated 20-Feb-15 0:24am
v4

You can search for values within a collection.
Using LINQ -> BuildingList.where(x => x.myProp == 'abc');
 
Share this answer
 
v2
Comments
[no name] 20-Feb-15 6:17am    
may you give me some examples,

thank you
Kuthuparakkal 21-Feb-15 16:06pm    
+5
Abhinav S 21-Feb-15 23:14pm    
Thanks.
i just Enitity values into observable collection BuildingList then that values are filter through particular value and then add into another observable collection BuildingList1

C#
ObservableCollection<paymententity> BuildingList1=new Obsevable Collection();
public void fillBuilding(int _locationId)
          {
              BuildingList1.Clear();
              foreach (var item in BuildingList)
              {
                  if (item.LocationId == _locationId)
                  {
                      BuildingList1.Add(item);
                  }
              }
 
Share this answer
 
v3
Comments
Kuthuparakkal 21-Feb-15 16:06pm    
not an answer
[no name] 23-Feb-15 9:09am    
how........???????????????????

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900