เป็นไปได้ไหมที่ Marshal จะเป็นประเภทส่งคืนทั่วไปซึ่งไม่ใช่แบบทั่วไปสำหรับ COM interop
สมมติว่าฉันมีคลาสต่อไปนี้:
[ComVisible(true)]
public class Foo
{
public IEnumerable<string> GetStr() // Generic return type
{
yield break;
}
}
ฉันรู้ว่า IEnumerable‹string› ใช้งาน IEnumerable
ฉันสามารถบังคับ tlbexp.exe (ผ่านทาง return: คุณลักษณะหรือวิธีอื่น) เพื่อเปิดเผยวิธีการ GetStr() เป็นวิธีการส่งคืน IEnumerable ได้หรือไม่