I have a library X, which has a class C which used component Y. However, Y isn't available in 64 bit, so it's been replaced by component Z, but I want to still use Y when available.
So I would like to reference Y and Z and then have
C.vb:
#If 32bit then
Class C
// implementation of C using Y
End Class
#End If
C64.vb
#If 64bit then
Public Class C
// implementation of C using Z
End Class
#End If
Note: C-style Comments due to highlighting errors with vb comments.
The problem, as I see it, is that I will have a reference to Y in the 64 bit version(it's a COM object, so it would be an interop assembly, if that makes a difference). Assuming Y is not called from anywhere in the code, will I be able to instantiate C?