C# DLL config file

后端 未结 17 2286
梦毁少年i
梦毁少年i 2020-11-22 05:05

Im trying to add an app.config file to my DLL, but all attempts have failed.

According to MusicGenesis in \'Putting configuration information in a DLL\' this should

17条回答
  •  有刺的猬
    2020-11-22 05:14

    you can use this code:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.InteropServices;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace GClass1
    {
    [Guid("D6F88E95-8A27-4ae6-B6DE-0542A0FC7039")]
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface _GesGasConnect
    {
        [DispId(1)]
        int SetClass1Ver(string version);
    
    
    }
    
    [Guid("13FE32AD-4BF8-495f-AB4D-6C61BD463EA4")]
    [ClassInterface(ClassInterfaceType.None)]
    [ProgId("InterfacesSMS.Setting")]
    public class Class1 : _Class1
    {
        public Class1() { }
    
    
        public int SetClass1(string version)
        {
            return (DateTime.Today.Day);
        }
    }
    }
    

提交回复
热议问题