Page 2 of 2

Re: help plz :D

Posted: Thu Nov 28, 2013 12:59 pm
by XTechVB
troop wrote:
how can public and shared be used by anyone?
if they can is there another word to share the dim between all forums without people can use it?
Well when you create a DLL all the needed functions/methods must be exposed using Public Shared so you can use them when you reference the DLL.
But using Public Shared its also dangerous, imagine the following scenario: You created an application and you have this code inside
Code: Select all
Public Shared MySecretCode As Integer = 123456
After you release that application someone can easily reference it and get that code like so
Code: Select all
Me.Text = WindowsApplication1.Form1.MySecretCode

Let me make this clear Public Shared is only dangerous if you expose passwords, access codes, personal information etc.. with them.
Sorry for my last post, i wasn't very specific.

Re: help plz :D

Posted: Thu Nov 28, 2013 1:22 pm
by troop
Ah i will only use it for stupid stuff lol :D