插件的配置文件

编程入门 行业动态 更新时间:2024-10-09 23:21:18
本文介绍了插件的配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨! 我正在用C#编写插件,用于使用SDK的CAD程序。 该插件将是一个DLL当然。 我想创建一个包含插件设置的ini文件。 所以我需要的目录插件? 如何获取包含dll文件的目录? 提前感谢您的帮助。 A. 我尝试过: 我试图在网上寻找解决方案。但我还没有找到。

Hi! I'm writing a plugin in C# for a CAD program used its SDK. The plugin will be a DLL of course. I would like to create an ini file that contain the settings of the plugin. So I need the directory of the plugin? How can I get that directory that contain the dll file? Thank you in advance for your help. A. What I have tried: I have tried to look for a solution on the web. But I haven't found yet.

推荐答案

你可以使用: Assembly.GetExecutingAssembly().CodeBase

但它需要一些清理,因为它以file:///开头。 有关详细信息,请参阅此处: Assembly.CodeBase Property(System.Reflection) [ ^ ]

But it will need some cleaning up, as it starts with "file:///". See here for more information: Assembly.CodeBase Property (System.Reflection)[^]

更多推荐

插件的配置文件

本文发布于:2023-11-24 00:38:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623340.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:配置文件   插件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!