sorry, but i still can get wat's the difference
between "Sharing" and "Public". I've tried out both ways
in creating a function in a component and i can still
reference the component from various different web
applications. So wat's the deal with shared and public?
-----Original Message----- Public Shared Function name() As Stringthe function returns a string...
so you call name like thing
Dim myNamePlease As String = name()
Public Shared Function name(ByVal fname As String)
Public means anyone on the outside that has an instanse
of the object canaccess it.
Shared, (more like Static), means that the same member is
called if you havetwo objects both calling one member.
it could have just been Shared in this case because the
automatic attributeis Public, unless Private or Protected is specified...
Think that's right!
"May" <ma**********@hotmail.com> wrote in message
news:00****************************@phx.gbl... greetings, i came across a function while browsing thru
the net. This function is created in a component. what i
am curious to know is, is this the correct way to
create a function using:
Public Shared Function name() As String
Don't we need some sort of parameter passing to use
the "As String"? Maybe something like this:
Public Shared Function name(ByVal fname As String)
i am also curious as to why we need to use "Public
Shared" and not just the keyword "Shared" alone. what is the
difference between these two? thanx!
.