方法 :アセンブリに ApplicationID 属性を適用する

この例では、ApplicationID 属性をアセンブリに適用する方法について説明します。

Imports System.EnterpriseServices
<assembly: ApplicationName("BankComponent")>
< assembly: ApplicationID("4fb2d46f-efc8-4643-bcd0-6e5bfa6a174c")>
Public Class Account 
Inherits ServicedComponent
   Shared Sub Main()
   End Sub
End Class 
using System.EnterpriseServices;
[ assembly: ApplicationName("BankComponent")]
[ assembly: ApplicationID("4fb2d46f-efc8-4643-bcd0-6e5bfa6a174c")] 
public class Account : ServicedComponent
{
   static void Main() {}
}

コードのコンパイル

この例で必要な要素は次のとおりです。

  • System および System.EnterpriseServices 名前空間への参照

関連項目

参照

System.EnterpriseServices

概念

サービス コンポーネントの登録

Footer image

Copyright © 2007 by Microsoft Corporation.All rights reserved.