All pastes #1600936 Raw Edit

Mine

public text v1 · immutable
#1600936 ·published 2009-10-07 09:56 UTC
rendered paste body
using System.Reflection;
...
Assembly asm = Assembly.LoadFrom(path);
...
public ArrayList GetForms()
{
    String typeNameForm = "System.Windows.Forms.Form";
    ArrayList res = new ArrayList();

    Type[] types = asm.GetTypes();

    // pour chacun des composants
    foreach (Type type in types)
    {
        // Si c'est un formulaire
        if (isTypeName(type, typeNameForm))
        {
            // on ajoute le formulaire dans la liste
            res.Add(type.FullName);
        }
    }
}