In the same solution, I have two projects: P1 and P2. How can I make use of a class of P1 in P2?
If you have two projects in one solution folder.Just add the Reference of the Project into another.using the Namespace you can get the classes. While Creating the object for that the requried class. Call the Method which you want.
FirstProject:
class FirstClass()
{
public string Name()
{
return "James";
}
}
Here add reference to the Second Project
SecondProject:
class SeccondClass
{
FirstProject.FirstClass obj=new FirstProject.FirstClass();
obj.Name();
}