>I've been trying to find how to do that with the Properties window on the right and no wonder why I didn't find it. So, am I understanding correclty that we cannot add a property such as we do in VFP by using the visual interface?
Nope. You have to code it. Welcome to this brave new world! 8-)
Indeed, you better try to understand the difference between properties and member classes. In .NET, a property is the way to access a member class, not the member class itself.
Do inside Cathi's code:
public int Width // This is the member class (or field)
{
get { return width; }
set
{
if (value > 0)
width = value;
else
throw new ArgumentOutOfRangeException("Width must be 1 or higher");
}
}
Of course Cathi or anyone else here can correct and enhance my explanation. But this actually how things are. VFP makes all of this invisible to us.
Best luck!