VB语句的C#等效 [英] C# eauivalent of a VB statement

查看:75
本文介绍了VB语句的C#等效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
谁能告诉我下面VB语句的C#等价物.

 treeView.Nodes.AddAt( 0 ,nodes.Item [index]); 


我在构建页面时遇到的错误是
''System.Web.UI.WebControls.TreeNodeCollection'' does not contain a definition for ''Item'' and no extension method ''Item'' accepting a first argument of type ''System.Web.UI.WebControls.TreeNodeCollection'' could be found (are you missing a using directive or an assembly reference?)

在此先感谢,
Reeogeo

解决方案

Try

 treeView.Nodes.AddAt( 0 ,nodes [index]); 


Hi all,
Can anybody tell me the C# euivalent of the VB statement Below.

treeView.Nodes.AddAt(0, nodes.Item[index]);


The error i am getting while buiding the page is
''System.Web.UI.WebControls.TreeNodeCollection'' does not contain a definition for ''Item'' and no extension method ''Item'' accepting a first argument of type ''System.Web.UI.WebControls.TreeNodeCollection'' could be found (are you missing a using directive or an assembly reference?)

Thanks In Advance,
Reeogeo

解决方案

Try

treeView.Nodes.AddAt(0, nodes[index]);


这篇关于VB语句的C#等效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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