Fred,
With a Class is there any difference between a readonly property and
function besides having to use Get/End Get.
I normally use properties for a 'value' or 'attribute' a noun, something
that describes the object. (I'm using attribute here to mean an OO
attribute, not a System.Attribute class)
I normally use functions for 'actions' or 'behavior' a verb, something that
the object does.
Also you can using data binding to bind to a property, while you cannot bind
to a function.
Are there any performance/resource advantages for either.
Not really as a Property is effectively a function in the IL.
I find it better to write "correct" programs then to worry about
performance. By "correct" I mean OO and use the correct tool for the correct
job (for example: a property for attributes and functions for
behavior/actions). Remember that most programs follow the 80/20 rule (link
below) that is 80% of the execution time of your program is spent in 20% of
your code. I will optimize
the 20% once that 20% has been identified & proven to be a performance
problem via profiling (see CLR Profiler in my other message).
For info on the 80/20 rule & optimizing only the 20% see Martin Fowler's
article "Yet Another Optimization Article" at
http://martinfowler.com/ieeeSoftware/yetOptimization.pdf
Hope this helps
Jay