Get the path of the form in another project

Hi All,

I had developing a Class Libary Project, and another project call ProjectA is referenced to Class Libary Project, for some purpose, i need to get the path of the form in ProjectA which is calling some function in my Class Libary project.

how can i to do it

Thank you very much.

Laputa




Answer this question

Get the path of the form in another project

  • jmarkel

    Get the type of the form, and then get the assembly from the type, finally the Location property of the Assembly will tell you the "path":



    Debug.Write( typeof(myForm).Assembly.Location );



    Regards,

    -chris

  • Get the path of the form in another project