日期:2014-05-18  浏览次数:20803 次

如何用C#编写COM组件?
现在要用C#写一个组件(.dll),别的平台也可以调用的,不知道如何做,请教各位。

------解决方案--------------------
com+一般咬用到下面命名空间
using System.EnterpriseServices;
例如
C# code

[ConstructionEnabledAttribute(Default="ILAssembly V1.0")]
    [JustInTimeActivation(true)]
    [Transaction(TransactionOption.Supported)]
    [ObjectPooling(true, 1, 5)]
    [Serializable()]
    public class testcom+ : ServicedComponent, IDisposable
       {
          //里面随便写你的函数
       }