Installer.HelpText 屬性

定義

取得安裝程式集合中所有安裝程式的說明文字。

public:
 virtual property System::String ^ HelpText { System::String ^ get(); };
public virtual string HelpText { get; }
member this.HelpText : string
Public Overridable ReadOnly Property HelpText As String

屬性值

安裝程式集合中所有安裝程式的說明文字,包括每個安裝程式執行動作的描述,以及可以傳遞給每個安裝程式且每個安裝程式都可了解的安裝可執行檔 (例如,InstallUtil.exe 公用程式) 的命令列選項。

例外狀況

安裝程式集合中的安裝程式之一指定 null 參考而不是說明文字。 這個例外狀況可能原因是已定義包含說明文字的欄位,但未將其初始化。

範例

下列範例示範 HelpText 屬性。 這個屬性定義在 類別中 Installer ,當呼叫 時,會傳回 Installer 安裝可執行檔的描述和命令行選項,例如可傳遞給 和 瞭解 Installer的 Installutil.exe 公用程式。

   // Override the property 'HelpText'.
property String^ HelpText 
{
   virtual String^ get() override
   {
      return "Installer Description : This is a sample Installer\n"
           + "HelpText is used to provide useful information about the "
           + "installer.";
   }
}
// Override the property 'HelpText'.
public override string HelpText
{
   get
   {
      return "Installer Description : This is a sample Installer\n"
           + "HelpText is used to provide useful information about the "
           + "installer.";
   }
}
' Override the property 'HelpText'.
Public Overrides ReadOnly Property HelpText() As String
   Get
      Return _
      "Installer Description : This is a sample Installer" + ControlChars.NewLine + _
      "HelpText is used to provide useful information about the installer."
   End Get
End Property

適用於

另請參閱