![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
|
"Arghyle" <JamesPaulHart (AT) gmail (DOT) com> ha scritto nel messaggio news:7b0d4ce2-0cd3-452e-93f4-69bb9fe9c5c3 (AT) v4g2000vba (DOT) googlegroups.com... Ok - 10,000 foot view... I have a C# class that exposes a public bool array. Looks kinda like this: [ClassInterface(ClassInterfaceType.AutoDual)] [ComVisible(true)]public MyClass { public bool[] myArray; } [...] I'm pretty sure it's marshalling properly - the VB Object Browser knows that.myArray is an array of Booleans. Following Ben's suggestion about differentiation between VB6 Boolean vs. ..NET Boolean, you may want to try with a MarshalAs setting like this for your 'bool[] myArray' public property: [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VarEnum.VT_BOOL)] Or you could just export a pair of getter/setter public methods to expose the array property, e.g. public bool GetMyArray(int index) public void SetMyArray(int index, bool value) HTH, Giovanni |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |