Okay so I am really new to C#. Previously I have played about in Access, however now I find the limitations of the combined packages I use to host Cloud systems frustrating forcing me to learn C# and ASP.net at the same time.
In my first step I am setting up a class to hold data relating to a swimming pool. Items like volume, area, surface finish and so on. All good no issue.
The thing that is bothering me is about technique more than how to. In Access the thinking is calculate values on the fly. Therefore we wouldn't store area or volume.
Transposing this thinking forward then would you set the value of average depth for example with:
private double aveDepth
or would you work it on demand in something like:
public getAveDepth
{
return (deep + shallow)/2
}
Or doesn't it matter?:disturbed:
In my first step I am setting up a class to hold data relating to a swimming pool. Items like volume, area, surface finish and so on. All good no issue.
The thing that is bothering me is about technique more than how to. In Access the thinking is calculate values on the fly. Therefore we wouldn't store area or volume.
Transposing this thinking forward then would you set the value of average depth for example with:
private double aveDepth
or would you work it on demand in something like:
public getAveDepth
{
return (deep + shallow)/2
}
Or doesn't it matter?:disturbed: