oclockvn
4/6/2015 - 9:06 AM

dynamicdllmethod3.cs

// ............
            try
            {
                if (!File.Exists(path + "\\" + assembyName + ".dll"))
                { // ... }
                
                type = Assembly.LoadFrom(path + "\\" + assembyName + ".dll")
                                       .GetType(assembyName + "." + className);
                paramTypes = new Type[parameters.GetUpperBound(0) + 1];
                foreach (object objectParameter in parameters)
                {
                    if (objectParameter != null)
                    {
                        paramTypes[count] = objectParameter.GetType();
                    }
                    count++;
                }
                // ...
            }
            catch (Exception ex)
            { // ... }
            finally
            { // ... }