A New Chicken
A New Chicken

Reputation: 703

Accessing windows application forms from class library in C#

I have a solution in C# with 2 project of 2 different types: windows app and class library. They all share the same namespace but I can't access forms in windows app although I add reference to System.Windows.Form in CL project. Help me, please!

Upvotes: 1

Views: 2667

Answers (2)

subprime
subprime

Reputation: 1215

You can't access windows forms from the libary.

Upvotes: -1

Adriaan Stander
Adriaan Stander

Reputation: 166396

If you require to access the forms within the WinApp, you need to add that WinApp as a reference to the class library.

Upvotes: 2

Related Questions