共用方式為


FileVersionInfo.InternalName 屬性

定義

取得檔案的內部名稱 (如果存在的話)。

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

屬性值

檔案的內部名稱。 如果沒有,則這個屬性會包含檔案的原始名稱,而不帶副檔名。

範例

下列範例會呼叫 GetVersionInfo 以取得 FileVersionInfo [記事本] 的 。 然後它會在文字框中列印 InternalName 。 此程式代碼假設 textBox1 已具現化。

private:
    void GetInternalName()
    {
        // Get the file version for the notepad.
        FileVersionInfo^ myFileVersionInfo =
            FileVersionInfo::GetVersionInfo( Environment::SystemDirectory + "\\Notepad.exe" );

        // Print the internal name.
        textBox1->Text = String::Concat( "Internal name: ", myFileVersionInfo->InternalName );
    }
private void GetInternalName()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

    // Print the internal name.
    textBox1.Text = "Internal name: " + myFileVersionInfo.InternalName;
}
Private Sub GetInternalName()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print the internal name.
    textBox1.Text = "Internal name: " & myFileVersionInfo.InternalName
End Sub

適用於