Im trying to edit some data within a class which is linked to with databinding. Here is my class:
public class Line
{
public string Equation { get; set; }
public int PreviousLine { get; set; }
public int LineNumber { get; private set; }
public Line()
{
this.LineNumber = (this.PreviousLine + 5);
}
}
however the line number always returns 5, even if previous line is set to 6...
here is how I link to it within my viewmodel:
this.Lines.Add(new Line { Equation = "5*2", PreviousLine = 6 });
thanks