In the past few days I've been reading about the differences betweeen properties and methods in C# and when use each. Most of the articles/questions I read says that getters should be "light" and never have large amount of logic or complex operations inside.
Right now I have a get
that I think is on the line between property and method, so I would like to see what you all think, if I should change to method or stay with the getter.
Also any other advice is welcome :D
public decimal[] getPreprocData
{
get
{
int i = 3;
decimal[] data = new decimal[9];
data[0] = (start.Value.Hour * 3600) + (start.Value.Minute * 60);
data[1] = duration.Value;
data[2] = flowRate.Value;
foreach (NumericUpDown nud in gbHTF.Controls.OfType<NumericUpDown>().OrderBy(nud => nud.TabIndex))
{
data[i] = nud.Value;
i++;
}
return data;
}
}