我似乎无法在这里找到它们.
我正在尝试将它们包含在我的热键选择对话框中.
我已经设置并运行了以下内容:
File file1.bat
File file2.xml
File common.file1.dll
File common.file2.dll
File common.file3.exe
Run Code Online (Sandbox Code Playgroud)
为了避免将公共文件保存在源目录中,我想要的是从父目录引用它们,如下所示:
File file1.bat
File file2.xml
File ..\common.file1.dll
File ..\common.file2.dll
File ..\common.file3.exe
Run Code Online (Sandbox Code Playgroud)
编辑:当我再次尝试时,这实际上有效.
但显然,这是不被承认的.
还有另一种方法来引用这些文件吗?
我有这堂课......
[XmlRoot("config")]
public class SourceConfig
{
public string Description { get; set; }
public string HelpLink { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
...我将其序列化为...
<config>
<Description />
<HelpLink />
<param name="param1" value="" />
<param name="param2" value="" />
</config>
Run Code Online (Sandbox Code Playgroud)
...使用XmlSerializer+后处理XmlDocument来添加<param>元素.
是否有更好的方法来序列化<param>元素而无需使用后处理XmlDocument?
我尝试使用XmlArray属性,但<param>元素最终在另一个节点内.
我有一个在Host类中实现的接口,如下所示:
void Method1(Action<Args1> action1, Action<Args1> action2);
Run Code Online (Sandbox Code Playgroud)
然后我有以下方法传递action1和action2.
private void Action1(Args1 obj)
{
//...
}
private void Action2(Args1 obj)
{
//...
}
Run Code Online (Sandbox Code Playgroud)
使用反射,我如何调用它并传递方法Action1和Action2?