AssemblyName.ToString Method
.NET Framework 4
Returns the full name of the assembly, also known as the display name.
Assembly: mscorlib (in mscorlib.dll)
See the description of AssemblyName for the format of the returned string.
The following example gets an AssemblyName object for a hypothetical MyAssembly.exe assembly, and then uses the ToString method to retrieve the full assembly name, or display name.
using System; using System.Reflection; public class AssemblyName_GetAssemblyName { public static void Main() { // Replace the string "MyAssembly.exe" with the name of an assembly, // including a path if necessary. If you do not have another assembly // to use, you can use whatever name you give to this assembly. // AssemblyName myAssemblyName = AssemblyName.GetAssemblyName("MyAssembly.exe"); Console.WriteLine("\nDisplaying assembly information:\n"); Console.WriteLine(myAssemblyName.ToString()); } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.