LZ是服务器激活方式(wellknown),采用这种方式远程对象只能采用默认的构造器,即无参的构造器
如果要重载构造器,应采用客户端激活方式
RemotingConfiguration.ApplicationName = "sayhello";
RemotingConfiguration.RegisterActivatedServiceType(
typeof(Class1));
Class1 a=new Class1("aaa",2);
如果要重载构造器,应采用客户端激活方式
RemotingConfiguration.ApplicationName = "sayhello";
RemotingConfiguration.RegisterActivatedServiceType(
typeof(Class1));
Class1 a=new Class1("aaa",2);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货