Link to home
Start Free TrialLog in
Avatar of jazzIIIlove
jazzIIIloveFlag for Sweden

asked on

how to from a project, reaching to the other project in C#?

Hi there;

I got a solution having 2 projects. What I tried to do is using the project1's class and related function in the project2.

I build the project1 and add the executable of project1 as reference to the project2, and then in the project2, trying to import the project1 as

using project2;

But simply above statement is not recognized. what to do?

My other related problem is that:
Both apps are Console application. That, in fact I need only one Main in my program but couldn't solve it out how to do when there are several applications in a solution

Kind regards.
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jazzIIIlove

ASKER

ok, you explained it extremely well, that I got a couple of related questions;

1) Should I remove the main function or the Program.cs (deleting Program.cs) as I don't require?
2) Ok for dll and its import to my project, no problem. But, why am I also using the "using" statement?

3) and when I change the name of the project, it seems namespace is not updated automatically. Is it safe to update the namespace manually or why isn't updated when change the name of the project?

Kind regards.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You are amazing...
Spectacular interest, genuine expert

There is  an definite art of the comments of the expert.
Too kind, sir. Glad to help  = )