这个不动态编译
using System;
namespace a
{
public delegate string Call();
public class Test1
{
public event Call c;
public string Say()
{
return "hello world";
}
}
}
这个动态编译
using System;
namespace b
{
class Test2
{
public static string Hello()
{
return "hello world";
}
public static void Band(a.Test1 t)
{
t.c+=b.Test2.Hello;
}
}
}
动态编译出错怎么解?
谢谢
这个逻辑不太通
改一下
using System;
namespace a
{
public delegate string Call();
public class Test1
{
public event Call c;
public string Say()
{
return c();
}
}
}
问题经检测就是出现在了动态的编译里出现了“a.Test1”
去掉这个方法就能通过
你用的什么编译方式,CodeDom的话,
编译时有CompilerParameters.ReferencedAssemblies这个属性,把你的a添进去再编译。
编译时有CompilerParameters.ReferencedAssemblies这个属性,把你的a添进去再编译。
温馨提示:答案为网友推荐,仅供参考
第1个回答 2015-07-21
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class test
{
public static void main(String[] args)throws Exception
{
int[] b=new int[200];
int[] c=new int[200];
int i, j;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str=null;
import java.io.InputStreamReader;
public class test
{
public static void main(String[] args)throws Exception
{
int[] b=new int[200];
int[] c=new int[200];
int i, j;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str=null;