Load system dll library : DLL « Development Class « C# / C Sharp






Load system dll library


using System;
using System.Reflection;

class Class1 {
   static void Main(string[] args) {
      string windir = Environment.GetEnvironmentVariable("windir");
      Assembly ass = Assembly.LoadFrom(windir + @"\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll");
      foreach (Type type in ass.GetTypes()) {
         Console.WriteLine(type.ToString());
      }
   }
}

           
       








Related examples in the same category

1.Build with the following command-line switches: csc /t:library DllTestServer.cs
2.Compile cs file to DLL
3.Create DLL library
4.Create DLLCreate DLL