how to locate a specific element in a list csharp

Code Example - how to locate a specific element in a list csharp

                
                        //7 will be the spot in the list
List<int> intList = new List<int>();
int x = List[7];
                    
                
 

find a value in list of objects in csharp

                        
                                var item = TextPool.FirstOrDefault(o => o.Name == "test");
if (item != null)
       item.value = "Value";
                            
                        
 

csharp find item in list

                        
                                MyClass result = list.Find(x => x.GetId() == "xy");
                            
                        
 

csharp find element in list of list

                        
                                var element = (from sublist in userList
               from item in sublist
               where item.uniqueidentifier == someid
               select item).FirstOrDefault();
                            
                        
 

find value in object csharp

                        
                                var item = TextPool.FirstOrDefault(o => o.Name == "test");
if (item != null)
       item.value = "Value";
                            
                        
 

list search csharp

                        
                                list.Where(x => x.Name == "theName");
return list;