help plz :D

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
12 posts Page 2 of 2
Contributors
User avatar
XTechVB
VIP - Site Partner
VIP - Site Partner
Posts: 727
Joined: Thu May 20, 2010 10:32 am

Re: help plz :D
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.
You can find me on Facebook or on Skype mihai_92b
User avatar
troop
Dedicated Member
Dedicated Member
Posts: 75
Joined: Sat Sep 28, 2013 11:57 am

Re: help plz :D
troop
Ah i will only use it for stupid stuff lol :D
12 posts Page 2 of 2
Return to “Coding Help & Support”