I've tried to work like: this one
Got an object class:
class Letter
{
public char letter {get; set;}
public List<int> posities { get; set; }
public Letter()
{
posities = new List<int>();
}
}
and want to add an int to the positions list by:
letters.Add(new Letter
{
letter = a,
posities.Add(i)
});
But can't get it working, what am I doing wrong?? (btw: the letter a is added like expected, the problem is with adding the positie i).
but wanted to keep it a minimal reproducible example.Minimal, perhaps. Reproducible - definitely not.