日期:2014-05-18  浏览次数:20772 次

接口方法实现问题
System.TypeLoadException: 程序集“VXTClientDataInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”中的类型“VXTClientDataInterface.ClientDataInterface”的方法“GetNewFiles”没有实现。
  在 System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase)
  在 System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
  在 System.Reflection.Assembly.CreateInstance(String typeName)
  在 Common.AssemblyLoader`1.CreateInstance(String strFilePath, String strTypeName) LongRuanDataSynchronizationClient.WinMain.InitClientManager()

------解决方案--------------------
方法“GetNewFiles”没有实现。
 
汉字也不认识吗?
------解决方案--------------------
继承接口的那个类要实现方法GetNewFiles啊
------解决方案--------------------
方法签名和你接口里面定义的一样么?
------解决方案--------------------
方法返回的类型不对
------解决方案--------------------
GetNewFiles的参数和返回值是否和接口的定义一致??!
------解决方案--------------------
实现接口的类中,方法参数不要改动了,比如参数多了,或者参数数据类型变了,是属于方法重载了。
比如 GetNewFiles(string strArg1)、GetNewFiles(string strArg1, string strArg2)、GetNewFiles(int intArg1)是属于重载
------解决方案--------------------
重新生成一下接口,然后删掉原来的方法,在实现一下接口的方法
------解决方案--------------------
重新生成一下接口,然后删掉原来的方法,在实现一下接口的方法
------解决方案--------------------
实现类里要把接口中的方法都实现
------解决方案--------------------
接口中声明的GetNewFiles, 在你的类中是一致的么? 比如返回值,参数个数, 参数类型等, 还后接口中是否有多个GetNewFiles方法的重载