How to Access the class in one solutionExplorer into another class in another solutionExplorer
Loading
How to Access the class in one solutionExplorer into another class in another solutionExplorer
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jayraj ChhayaRank #304 · 8.2K reputationPosted Dec 12, 2023, 6:19 AM EST
Once the class is accessible in the new solution explorer, you can use it just like any other class in your code. Make sure to include the appropriate namespace and reference the class accordingly.
It's important to note that accessing classes between different solution explorers may introduce dependencies and can lead to a tightly coupled codebase. Consider using a shared library or module to encapsulate common functionality and promote code reusability.
Vishal JoshiRank #377 · 6.7K reputationPosted Dec 12, 2023, 6:48 AM EST
Hello
You can create a Library project and using the project reference add it as a reference project in all expected projects.
Note: Solution Explorer is just like a bunch of projects. Ideally, you can add references to Web, Console, and API projects. But it is good practice to create a library project to separate out the code and reduce circular reference issues.
Thanks
Vishal
Nagaveni Katari191 reputationPosted Dec 12, 2023, 7:02 AM EST
solution explorer -namespace-classes-methods here i want to call the methods in that solution into my solutionExplorer-mynamespace-myclass-inmethod how to call .