Im developing a COM object in C#, VS 2010, .Net 3.5, x86
I used to have a array of structs in the COM Object, which in VBA showed up fine with all the fields and everything.
I switched to class since It created some issues. Now how ever I cant access the properties in the array, since the elements in the array show up as object instead of type.
[Guid("8b65079f-5d98-41e7-9579-1ee384948e4c")]
[ComVisible(true)]
public interface IContact
{
string Test1 { get; set; }
string[] Array1 { get; set; }
}
[Guid("8b65089f-5d98-41e7-9579-1ee384948e4c")]
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.AutoDual)]
public class Contact : IContact //Used To Be a struct
{
//[MarshalAs(UnmanagedType.BStr)]
public string Test1 { get; set; }
public string[] Array1 { get; set; }
}
public class InContainer
{
public Contact[] Contacts { get;set;}
public string[] strings { get; set; }
}
In the debugger I see when viewing the field:
Container.Contacts() -> (0 To 4) As Object
instead of
Container.Contacts() -> (0 To 4) As Contact
What am i missing? Thanks!
