3
私はこのコードで(のはCIそれを呼びましょう)Microsoft.Office.Interop.Outlook.ContactItemオブジェクトのプロパティを列挙しようとしている:列挙見通しContactItemプロパティ
System.Reflection.BindingFlags bf = System.Reflection.BindingFlags.Default;
foreach (System.Reflection.PropertyInfo pi in ci.GetType().GetProperties(bf))
{
Console.WriteLine("Property Info {0}", pi.Name);
}
私は実際にいくつかを試してみましたBindingFlag値の組み合わせは返されますが、プロパティは返されません。
これはContactItemが定義されている方法です。 using System.Runtime.InteropServices;
namespace Microsoft.Office.Interop.Outlook
{
[Guid("00063021-0000-0000-C000-000000000046")]
[CoClass(typeof(ContactItemClass))]
public interface ContactItem : _ContactItem, ItemEvents_10_Event
{
}
}
これは_ContactItemが定義されている方法です(私は単純化のための唯一の3小道具を守ってきた):
using System;
using System.Runtime.InteropServices;
namespace Microsoft.Office.Interop.Outlook
{
[TypeLibType(4160)]
[Guid("00063021-0000-0000-C000-000000000046")]
public interface _ContactItem
{
[DispId(14848)]
string Account { get; set; }
[DispId(63511)]
Actions Actions { get; }
[DispId(14913)]
DateTime Anniversary { get; set; }
}
}
誰かが私を助けてもらえますか?事前に
おかげ
ボブ