Udostępnij przez


FileVersionInfo.InternalName Właściwość

Definicja

Pobiera wewnętrzną nazwę pliku, jeśli istnieje.

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

Wartość właściwości

Wewnętrzna nazwa pliku. Jeśli żadna z nich nie istnieje, ta właściwość będzie zawierać oryginalną nazwę pliku bez rozszerzenia.

Przykłady

Poniższe przykładowe wywołania GetVersionInfo w celu pobrania FileVersionInfo elementu dla Notatnika. Następnie drukuje element InternalName w polu tekstowym. W tym kodzie przyjęto założenie textBox1 , że zostało utworzone wystąpienie.

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

Dotyczy