Say I have two class libraries in C# and an outside project that I want to use those libraries in:
LibA.dll
LibB.dll which also references LibA.dll because it uses some of its classes.
Project C which references both LibA.dll and LibB.dll
Lets say inside of LibB.dll
I have a method that returns a class type from LibA.dll
and inside of my project, I want to immediately set the proper class types when calling that method. For example:
LibA.classInsideLibA myObj = LibB.getClassInsideLibAInstance();
This should work, but I am wondering if there will be any issues present when referencing LibA.dll
and LibB.dll
inside of my project when LibB.dll
already references LibA.dll
. Does referencing LibB.dll
automatically reference LibA.dll
in this case?
You already do this all the time. Take for instance the
string
class and pretend that's yourLibA
. I'm sure you've got a library that returns astring
. You've also probably returned a string from your library and referencedmscorlib
(whereString
lives) in your main project.This is no different.