110,546
社区成员
发帖
与我相关
我的任务
分享
namespace cs_ConsoleApplication1
{
[ComVisible(true)]
[Guid("154BD6A6-5AB8-4d7d-A343-0A68AB79470B")]
public interface MyCom_Interface
{
[DispId(1)]
int Add(int a, int b);
}
[ComVisible(true)]
[ProgId("my.co1")]
[Guid("2E3C7BAD-1051-4622-9C4C-215182C6BF58"),
ClassInterface(ClassInterfaceType.None)
]
public class Class1 : MyCom_Interface
{
public int Add(int a, int b)
{
return a + b;
}
}
public string MyName{get;set;}