Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Public Shared

    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!
    May Guest

  2. Similar Questions and Discussions

    1. Shared Memory/Shared Buffers
      I have noticed that I can't set the shared buffers above 15512 which is exactly 128MB of RAM. Even if I set /proc/sys/kernel/shmmax above that,...
    2. About to go public - critcism please
      http://www.collierknightwatts.com Please try to break it. Please try to find glitches. Please let me know if you find any holes. Lastly - the...
    3. Public Constants
      Hi, what is a good way to implement public common constants. like what we do in a common header file in C++. jeff
    4. how to have a gpg public key?
      How can i have a gpg public key? -- Thank you, Louie Miranda (louie@axishift.ath.cx) -- To UNSUBSCRIBE, email to...
    5. Can I have local Shared Documents folder *NOT* shared on the Local Network
      I finally have my local network working well enough (Thanks Steve W.!). I think I have learned that "network connection" does not get you anything...
  3. #2

    Default Re: Public Shared

    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 String
    >the 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 can
    >access it.
    >Shared, (more like Static), means that the same member is
    called if you have
    >two objects both calling one member.
    >
    >it could have just been Shared in this case because the
    automatic attribute
    >is Public, unless Private or Protected is specified...
    >
    >Think that's right!
    >
    >
    >
    >"May" <marianne_too@hotmail.com> wrote in message
    >news:00ba01c34629$02e177c0$a101280a@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!
    >
    >
    >.
    >
    May Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139