Friday, 27 September 2013

c# check if library/namespace/class exists (at compile time)

c# check if library/namespace/class exists (at compile time)

I've written some code in c# that uses a library, but I want to share it
and want it to work regardless of whether that library exists, basically I
want to check in my code whether the library exists, and if it doesn't, I
use alternate code to do what the library was supposed to do.
So how would you do that?
I thought maybe I could use Preprocessor Directives, but to be honest I
have little experience with these and can't seem to find how to this.

No comments:

Post a Comment