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.
 
Back
Top