vb.net中的CType [英] CType in vb.net
本文介绍了vb.net中的CType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SELECT op_need_name
FROM ces_v_skill_operation_name
WHERE oper_need_code in (SELECT DISTINCT oper_need_code FROM ces_skill_style_master WHERE fg_mat_no = '" + (ValueDescriptionPair)ddstyle.SelectedItem.Value + "')AND critical_code ='B'
当我编译代码时,出现了这样的错误
When i compile the code i got the error like this
Error 1 Cannot convert type 'string' to 'ValueDescriptionPair'
请帮助某人
在此先感谢
Pls help somebody
Thanks in advance
推荐答案
您正在尝试将内部类型转换为复杂类型.你不能那样做.
更改此内容:
You''re trying to convert an intrinsic type to a complex type. You can''t do that.
Change this:
(ValueDescriptionPair)ddstyle.SelectedItem.Value
对此:
to this:
ddstyle.SelectedItem.Value.ToString()
这篇关于vb.net中的CType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文