问题描述
在vb我们说....
Dim theRow as dsLogin.CustLoginRow
theRow = DsLogin1.CustLogin.Rows(0)
如果我试着在C#中说出以下内容,我说我不能做一个隐含的
转换...
dsLogin.CustLoginRow theRow;
theRow = dsLogin1.CustLogin.Rows [0];
所以我不得不说......
dsLogin.CustLoginRow theRow;
theRow =(dsLogin.CustLoginRow)dsLogin1.CustLogin.Rows [0];
,这是非常罗嗦的。有没有更好的方式在C#中说这个?
再次感谢(抱歉这么多问题)
T
In vb we say....
Dim theRow As dsLogin.CustLoginRow
theRow = DsLogin1.CustLogin.Rows(0)
If I try to say the following in C# it says I can''t do an implicit
conversion...
dsLogin.CustLoginRow theRow;
theRow = dsLogin1.CustLogin.Rows[0];
So I had to say......
dsLogin.CustLoginRow theRow;
theRow = (dsLogin.CustLoginRow) dsLogin1.CustLogin.Rows[0];
that''s pretty wordy. Is there a better way to say this in C#?
Thanks again (and sorry for so many quesions)
T
这篇关于ADO C#VB的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!