Shared functions..

  • Thread starter Thread starter VJ
  • Start date Start date
V

VJ

I have a class delecared as below in my Project.. When I complie my project
as DLL, I don't want this class and the shared function to be available when
they consuming application not to see this class...


Public Class RDFiles

Public Shared Function EtRD(ByVal File As String) As Boolean


End Function

End Class

How do i make sure this?

VJ
 
* "VJ said:
I have a class delecared as below in my Project.. When I complie my project
as DLL, I don't want this class and the shared function to be available when
they consuming application not to see this class...


Public Class RDFiles

Public Shared Function EtRD(ByVal File As String) As Boolean


End Function

End Class

As Ken said, you can change the modifier to 'Friend'. If you want to
restrict access to some assemblies, you can check
'System.Reflection.Assembly.GetCallingAssembly' and decide on the return
value to call the code or to throw an exception.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top