Hi,
it looks like that I am not able to expose via COM a class to an unmanaged client if one of the property of the class has type DateTime
.
Example:
[ComVisible(true)]
public interface ITest
{
string Name { get; }
DateTime Date { get; }
}
[Serializable]
[ComVisible(true)]
public class Test : ITest
{
public string Name { get; private set; }
public DateTime Date { get; private set; }
}
Only if I comment out the Date
property on both the interface and implementation will the .tlh file contain a the Test structure (obviously without the Date
).
Any idea? Is there a way to represent a date that is visible via COM? Do I really need to pass the Date
as a string
and then parse it?
Thank you for your time!