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 = "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

适用于