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

asp.net -_-!!!! 这个该如何写...........................................
set trayUtil = CreateObject("EpTrayUtil.Util")
userInfo = trayUtil.DecryptDataList(pubkey, strMD5SecureKey, strNewDataList)


汗了 C#的语法该怎么写啊。。。
PS:大家能推荐些学习C#的教程嘛。。。。

------解决方案--------------------
使用反射,就很简单。下面的代码没有经过测试, 不过我想应该不会有什么大问题。

Type type = Type.GetType("EpTrayUtil.Util"); 
object o = type.Assembly.CreateInstance("EpTrayUtil.Util");
type.InvokeMember(
"DecryptDataList", 
System.Reflection.BindingFlags.InvokeMethod, 
null, 
o,
new object[] {pubkey, strMD5SecureKey, strNewDataList})
------解决方案--------------------
EpTrayUtil.Util trayUtil = new EpTrayUtil.Util
userInfo = trayUtil.DecryptDataList(pubkey, strMD5SecureKey, strNewDataList) 

------解决方案--------------------
探讨
EpTrayUtil.Util trayUtil = new EpTrayUtil.Util
userInfo = trayUtil.DecryptDataList(pubkey, strMD5SecureKey, strNewDataList)