would anyone be kind enough to help me on this ? real good exercice on lists.
I was not able to find such example to copy anywhere...
I have this class inside of a strategy :
List<ex> exempleList = new List<ex>(); public class ex { private string s; public ex( string s ) { this.s = s; } public string S { get { return s; } set { s = value; } } } // we would use this syntax to add values to ex from its parent : exempleList.Add(new ex(somevaluea));
f will contain multiple dictionaries <int, string>, (or any kind of structure with one int associated to one string, if there is more appropriate than dictionaries for this specific case).
later I want to query through f per ex object.
How would we create f inside ex ?
How would we create the dictionnaries/other lists inside f ?
how would we add values inside f from the parent of ex ?
how would we then query inside f from the parent of ex ?
Comment