Application.ProductName Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the product name associated with this application.
public:
static property System::String ^ ProductName { System::String ^ get(); };
public static string ProductName { get; }
public static string? ProductName { get; }
static member ProductName : string
Public Shared ReadOnly Property ProductName As String
The product name.
The following code example gets this property and displays its value in a text box. The example requires that textBox1
has been placed on a form.
private:
void PrintProductName()
{
textBox1->Text = "The product name is: {0}",
Application::ProductName;
}
private void PrintProductName() {
textBox1.Text = "The product name is: " +
Application.ProductName;
}
Private Sub PrintProductName()
textBox1.Text = "The product name is: " & _
Application.ProductName
End Sub
ProductName
is taken from the metadata of the assembly containing the main form of the current application. You can set it by setting AssemblyProductAttribute inside of your assembly manifest. For more information, see Assembly Manifest.
Продукт | Версії |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
Відгук про .NET
.NET – це проект із відкритим кодом. Виберіть посилання, щоб надати відгук: