c#动态调用带参数的DLL函数,该怎么处理

c#动态调用带参数的DLL函数
DLL:
namespace MODBUSCommunicationProtocol
{
 public class MODBUSCommunicationProtocol
 {
  public string GetHexValue(string hexString, string type, int lenght)
  { ... }
  public string GetMODBUSString(string hexString, string type)
  { ... }
 }


主程序调:
Assembly ass = Assembly.LoadFrom("*.DLL"); 
Type type = ass.GetType("MODBUSCommunicationProtocol.MODBUSCommunicationProtocol");  
Object obj = Activator.CreateInstance(type); 
System.Reflection.MethodInfo gtMString = type.GetMethod("GetMODBUSString"); System.Reflection.MethodInfo gtHValue = type.GetMethod("GetHexValue");

sNData = (string)gtMString.Invoke(obj, new string[] { "aa","aa" });//(调用成功没有任何问题--参数都是字符型的)
sNData = (string)gtHValue.Invoke(obj, new object[] {(string)sNData,(string)sTPY,(Int32)sBYT });
//这个就有问题,参数的类型不一样,我应该怎么写?调高手指导一下。

------解决方案--------------------
sNData.ToString()之类的试试呢
------解决方案--------------------
楼上正解
------解决方案--------------------
sNData本身是 string 的了, sTPY 和 sBYT 是怎么定义的?
------解决方案--------------------
sNData = (string)gtMString.Invoke(obj, new string[] { "aa","aa" });//(调用成功没有任何问题--参数都是字符型的)
sNData = (string)gtHValue.Invoke(obj, new object[] {(string)sNData,(string)sTPY,(Int32)sBYT });

gtMString返回值不就是string么 为啥还要加(string)