Constructing an assembly name
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Security;
using System.Security.Permissions;
using System.Security.Policy;
public class MainClass
{
public static void Main()
{
AssemblyName mscorlib = new AssemblyName();
mscorlib.Name = "mscorlib";
mscorlib.Version = new Version(2, 0, 0, 0);
mscorlib.CultureInfo = CultureInfo.InvariantCulture;
mscorlib.SetPublicKeyToken(new byte[] {
0xb7, 0x7a, 0x5c, 056, 0x19, 0x34, 0xe0, 0x89 });
mscorlib.ProcessorArchitecture = ProcessorArchitecture.X86;
Console.WriteLine(mscorlib);
}
}
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c381934e089
Create an AssemblyName object
using System;
using System.Reflection;
class MainClass
{
public static void Main(string[] args)
{
AssemblyName assembly1 = new AssemblyName("com.microsoft.crypto, " +
"Culture=en, PublicKeyToken=a5d015c7d5a0b012, Version=1.0.0.0");
}
}