📜  从 C 或 C++ 调用 .NET 程序集 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:51.731000             🧑  作者: Mango

代码示例1
[Guid("123565C4-C5FA-4512-A560-1D47F9FDFA20")]
public interface IConfig
{
    [DispId(1)]
    string Destination{ get; }
    
    [DispId(2)]
    void Unserialize();
    
    [DispId(3)]
    void Serialize();
}

[ComVisible(true)]
[Guid("12AC8095-BD27-4de8-A30B-991940666927")]
[ClassInterface(ClassInterfaceType.None)]
public sealed class Config : IConfig
{
    public Config()
    {
    }
    public string Destination
    {
        get { return ""; }
    }
    public void Serialize()
    {
    }
    public void Unserialize()
    {
    }
}