I need to access third-party classes that may or may not be available. How can we handle a situation like this?
For example:
Class ThirdPartyClass may or may not be available. It has one static variable myInt.
int someInt;
if(ThirdPartyClass is available) // pseudo-code
{
someInt = ThirdPartyClass.myInt;
} else {
someInt = 0;
}
You are basically talking about reflection. I am assuming we do not need to try to auto-discover assemblies.
You can do this something along the lines of: