Home » c# » c# – Class access methods-Exceptionshub

c# – Class access methods-Exceptionshub

Posted by: admin February 24, 2020 Leave a comment


How can I access a class which is in another project in C#. Please keep in mind that I cannot add any reference due to creating circular referencing.

Is there any way?

How to&Answers:

Not without some refactoring. Reflection could help but you still wouldn’t be able to extend from that class or use it in any non runtime way.

I have found that this can happen with minimum refactoring

  1. Identify the shared code
  2. Extract it to a new shared project
  3. Add the new project as a reference to all projects that need it