获取System .__ ComObject而不是数据,如何获取数据? [英] Getting System.__ComObject instead of data, how can I fetch data?

查看:971
本文介绍了获取System .__ ComObject而不是数据,如何获取数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我将应用程序从vb迁移到vb.net,我遇到了一个问题.也就是说,我的应用程序从vc ++ dll代码获取数据是

Hi
I migrated application from vb to vb.net I am facing one issue. That is, my application getting data from vc++ dll code is

With mobjReply 
  str =Trim(.GetRecord(0)(0).ToString())
  str2= Trim(.GetRecord(0)(1).ToString())
End With  



VB应用程序提供正确的数据(例如名称和电话),但vb.net提供{System .__ ComObject}

请提出如何使用vb.net/C#提取数据的建议?

谢谢



VB application giving correct data like name, and phone but vb.net giving {System.__ComObject}

Please suggest how can I fetch data using vb.net /C#?

Thanks

推荐答案

就像我上次发布此文章时所说的,由于对象未实现ToString,因此得到"System .__ ComObject".默认实现返回类名称.

您需要先将其转换为普通数据类型.

请不要仅仅因为不喜欢答案而删除问题,这很不礼貌!
As I said when you posted this last time, you get "System.__ComObject" because the object does not implement ToString. The default implementation returns the class name.

You need to cast it to a normal datatype before using it.

Please, don''t just delete questions because you don''t like the answers, it is rude!


这篇关于获取System .__ ComObject而不是数据,如何获取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆