.NET addin code, strange runtime error

Discussion created by AlistairFrith on Apr 1, 2009
Latest reply on Sep 28, 2010 by AlistairFrith

I have the following code in a .NET Processbook addin:


public sub foo()
  dim sdk as PISDK.PISDK
  sdk = new PISDK.PISDK
  ' further code removed for clarity
  ' ...
end sub


but it fails on the new line with the error Unable to cast object of type PISDK.PISDKClass to type PISDK.PISDKClass


So it seems to be complaining that it can't convert from one type to the same type! Why would this be?


--- Alistair.