ColinMay80
Member
- Joined
- Sep 27, 2021
- Messages
- 10
- Programming Experience
- 3-5
This is a silly example but hope you get the idea.
Say I have a list of Persons, that contains a list of jeans which contains a list of features. In class, Feature, we have a Name property that is a FeatureType.
How do I check (and return the filtered list) and for example I have a list of 5 persons each having multiple pairs of jeans and 3 persons have jeans that match the criteria of having jeans that have a feature name of TORN and LOOSE?
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
	
		
			
		
		
	
				
			Say I have a list of Persons, that contains a list of jeans which contains a list of features. In class, Feature, we have a Name property that is a FeatureType.
How do I check (and return the filtered list) and for example I have a list of 5 persons each having multiple pairs of jeans and 3 persons have jeans that match the criteria of having jeans that have a feature name of TORN and LOOSE?
			
				C#:
			
		
		
		class Person
{
   List<Jean> Jeans
}
class Jean
{
     List<Feature> Features
}
class Feature
{
    string ProductCode
    FeatureType Name
}
public enum FeatureType 
{
    TORN,
    SKINNY,
    LOOSE,
    TAPERED
}
			
				Last edited: 
			
		
	
								
								
									
	
		
			
		
		
	
	
	
		
			
		
		
	
								
							
							 
	 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		