用的是C#语言,而C#访问实现IEnumerable接口的对象是使用索引器,就是这样写:
title.Text=ds.Tables["guestbook"].Rows[0]["title"];
而Item属性是VB.Net专用的索引器写法。
myDs.Tables["emp"].Rows[e.Item.ItemIndex]【last_name"】= Name.Text;
本文探讨了C#与VB.NET中访问IEnumerable接口对象的不同方式。C#采用索引器如title.Text=ds.Tables[guestbook].Rows[0][title];而VB.NET则使用Item属性进行类似操作,例如myDs.Tables[emp].Rows[e.Item.ItemIndex][last_name]=Name.Text。
用的是C#语言,而C#访问实现IEnumerable接口的对象是使用索引器,就是这样写:
title.Text=ds.Tables["guestbook"].Rows[0]["title"];
而Item属性是VB.Net专用的索引器写法。
myDs.Tables["emp"].Rows[e.Item.ItemIndex]【last_name"】= Name.Text;
2062

被折叠的 条评论
为什么被折叠?