When I find examples online of VB.NET watch some functions use:
(Protected / Partial) & (Friend / Shared) & (Sub / Function) exp()
End (Sub / Function)
My question what is the difference?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
These are actually different, somewhat unrelated items.
Public,Protected,Private, andFriendare Access Levels, which determine who can “see” or use your method.Partialis used to split the declaration of a type across multiple files. See Partial for details.SubandFunctiondefine procedures. Sub procedures do not return values, where Function procedures return a value.You’d typically combine one access level with one procedure definition, hence
Private SuborPublic Function, etc.