ILOG CPLEX 11.0 User's Manual > Programming Considerations > Licensing an Application > Examples > The RegisterLicense Method for .NET Users

Here is an example for .NET users applying Cplex.RegisterLicense:

  internal static string ilm_CPLEX_license="LICENSE ILOG User\n RUNTIME CPLEX
     9.200 05-Aug-2005 62RAR21A8NC5 N any , options: m ";
  internal static int ilm_CPLEX_license_signature=863909;
 public static void Main(string[] args) {
    try {
      Cplex.RegisterLicense(ilm_CPLEX_license, ilm_CPLEX_license_signature);
      Cplex cplex = new Cplex();
    }
    catch (ILOG.Concert.Exception e) {
      System.Console.WriteLine("Expected Concert exception caught: " + e);
    }
}