AssemblyName Constructor (String)
Initializes a new instance of the AssemblyName class with the specified display name.
Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
| Exception | Condition | ||
|---|---|---|---|
| ArgumentNullException | assemblyName is a null reference (Nothing in Visual Basic). | ||
| ArgumentException | assemblyName is a zero length string. | ||
| FileLoadException |
The referenced assembly could not be found, or could not be loaded. |
The supplied assemblyName is parsed, and the appropriate fields of the new AssemblyName are initialized with values from the display name. This is the recommended way of parsing display names. Writing your own code to parse display names is not recommended.
The following example creates an instance of AssemblyName from a display name. The individual elements of the display name are output to the console as properties of the AssemblyName object.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note