Hi everyone,
(This is a repost from the CLR group, no one there had a response for
me, so hopefully someone here will)
-----------------------------
I'm having a strange problem. Let me present it:
I have a bunch of Classes in .Net (C#). Most of them are accessible via
COM (I have supplied a Guid attribute and a ClassInterface attribute).
Below is a basic structure of what I am accessing.
Class Convertible{
public CallPutSchedule CallPutSchedule{
get{ return callPutSchedule; }
set{ this.callPutSchedule = value; }
}
private CallPutSchedule callPutSchedule
}
I can get/set this property just fine.
I also have a WinForm called PropMaster which takes a given object with
some defined accessor methods (Add, Get, Remove) and properties (Count).
CallPutSchedule has these defined.
In a complex VBA Excel file (which also has it's own clsCallPutSchedule
which is used in clsInstrument which has a property CallPutSchedule,
same as in .Net), I get a problem. I can send CallPutSchedule to my
PropMaster and it will do some stuff for me and let me edit all the
objects within it very easily, but here is what happens.
'' VB
MsgBox convertible.CallPutSchedule.GetType().ToString()
''CallPutSchedule
Call propMaster.LoadProperty( convertible.CallPutSchedule )
// C#
public void LoadProperty( object o ){
Log.Info( o.ToString() ); //CallPutSchedule
Log.Info( o.GetType().ToString() ); //System.String
o.GetType().GetMethods(); //Returns methods for System.String
}
Would someone be able to explain this very perplexing behaviour to me?
Thanks,
Akshay