troubleshooting Question

Check if item contains from List item which is inside another list

Avatar of Dinesh Bali
Dinesh Bali asked on
.NET ProgrammingC#LINQ Query
3 Comments1 Solution141 ViewsLast Modified:
Hi,

I am working on C# .Net project.

How I will make Linq query if I need to find the data from List object which is inside List?

public class CoreServicesRules
    {
        public List<CoreServicesProductDetails> CoreServicesProductList { get; set; }
    }


    public class CoreServicesProductDetails
    {   
        public List<string> ProductCodeList { get; set; }
        public string ReplaceProductCodeFromString { get; set; }
        public string ReplaceProductRateWithString { get; set; }
    }
     
      Now I wanted to check data from
      
	public List<string> ProductCodeList { get; set; }
     

      and I have object for CoreServicesRules
      
      
      I wanted to see if ProductCodeList contains "My product Code".
      
      Please help me with the query.
ASKER CERTIFIED SOLUTION
it_saige
Developer
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros