PrivateComponentAttribute Class
Identifies a component as a private component that is only seen and activated by components in the same application. This class cannot be inherited.
Assembly: System.EnterpriseServices (in System.EnterpriseServices.dll)
For more information about using attributes, see Extending Metadata Using Attributes.
The following code example shows the use of the PrivateComponentAttribute type.
Imports System Imports System.EnterpriseServices Imports System.Reflection ' References: ' System.EnterpriseServices ' Note: Access checks must be performed at the component level to allow access ' to private components. <assembly: ApplicationAccessControl(False, AccessChecksLevel := AccessChecksLevelOption.ApplicationComponent)> <PrivateComponent()> _ Public Class PrivateComponentAttribute_Example Inherits ServicedComponent Public Sub Example() ' Display some output. MsgBox("Private component called successfully.") End Sub 'Example End Class 'PrivateComponentAttribute_Example Public Class PrivateComponentAttribute_Test Inherits ServicedComponent Public Sub Test() ' Create a new instance of the example class. Dim example As New PrivateComponentAttribute_Example() ' Call a method on the class. example.Example() End Sub 'Test End Class 'PrivateComponentAttribute_Test
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.