クラスで PrivateComponentAttribute 属性を使用する方法を次の例に示します。
<PrivateComponent()> Public Class CPrivate Inherits ServicedComponent
[PrivateComponent] public class CPrivate : ServicedComponent
この例では、下記が必要です。
System.ServiceProcess 名前空間への参照