"PAul Maskens" <pm******@mvps.org> wrote in message
news:uK**************@TK2MSFTNGP09.phx.gbl...
Every other language I've worked in, you can return a value from a
subroutine/method/function.
Oh the joys of terminological confusion:
"subroutine"
VB calls this a Sub and you /cannot/ return a result from one.
Sub Fred
' lots of good stuff
End Sub
"function"
VB calls this (surprise, surprise) a Function and you can return
results from them (and, IIRC, Option Strict On insists on it).
Function Foo( ... ) as <<ReturnDataType>>
Foo = <<value>>
' or
Return <<value>>
' or both
End Function
Property (the one you're missing)
This frequently exposes variables within a class to the "Outside
World". You assign values to them and read their value back
just like any other variable.
Public Property Thing() As <<DataType>>
Get
Return <<value>>
End Get
Set(ByVal Value As Integer)
<<variable>> = value
End Set
End Property
"method"
This one's the grey area because it depends entirely on how /you/
define them - a "method" can be either a Sub or a Function, as per
the "rules" above.
HTH,
Phill W.