I'd like to build a class (Abc) that is shared between C# projects on source code basis. Some of these projects know a particular class (Xyz), some don't.
So when I make a function like Abc.DoSomething(Xyz xyz), it would result in a compile time error in the projects where Xyz is not known. How can I make source code that is only compiled when Xyz is known?
#define works only within the same source file and I'd like to avoid others to need more than including the source file of Abc to their project.
(Don't beat me, if my English is too poor for you.)
P.S.: At least, there would be the possibility to make a #if ... #warning section...