What I want to do is to load in a dll dynamically (which I think I have achieved with this code below, a message box is showing the name of the class within the dll file). I then want to return the value of a variable which is defined by the string 'variableName'.

Any ideas?

private void Form1_Load(object sender, EventArgs e)
            classLocation = @"E:\Projects\Dll\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll";
            variableName= "HelloWorld";

        static void CallClass1(string filename, string className)
            string fullFileName = new System.IO.FileInfo(filename).FullName;
            Assembly assembly = Assembly.LoadFile(filename);
foreach (Type type in assembly.GetTypes())
                //Get the property of variable 'variableName'

Thanks, Chris

How is that variable declared in the assembly? A static or const value? Is it a member of the class? You need to reflect in to the assembly.