GETTING METHODS FROM SCRIPT

is there is any way to get List of methods names of a script I want to run .
I simply want to have combo box with all methods available so that the user can choose which method to run.
Hi,
Once script is compiled you can query types and methods in Script assembly using reflection, below is the code:
Please note that this code returns only static methods, if you need to call public methods, you will need to change BindingFlags.Static to BindingFlags.Instance and instantiate class defined in the script code using System.Activator.CreateInstance()
if (!scriptRun.Compiled)
{
if (!scriptRun.Compile())
{
return;
}
}
var assembly = scriptRun.ScriptHost.ScriptAssembly;
IList methods = new List();
foreach (Type type in assembly.GetTypes())
{
if (type != null)
{
foreach (var method in type.GetMethods(System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public))
methods.Add(method.Name);
}
}
regards,
Andrew