covert the vb.net code to c#
-
-
while (cnt < dsAllUpdtblData.Tables[0].Rows.Count - 1) { if(dsAllUpdtblData.Tables[0].Rows[cnt].Item[6].ToString()=="") { } cnt = cnt + 1; } i have above code in tht ....it will give an error to Item[6] this part how i will get perticulat column?
-
while (cnt < dsAllUpdtblData.Tables[0].Rows.Count - 1) { if(dsAllUpdtblData.Tables[0].Rows[cnt].Item[6].ToString()=="") { } cnt = cnt + 1; } i have above code in tht ....it will give an error to Item[6] this part how i will get perticulat column?
use dsAllUpdtblData.Tables["tablename"].Rows[cnt].Item["columnName"].ToString() instead of doing dsAllUpdtblData.Tables[0].Rows[cnt].Item[6].ToString() I think if you use columnname the problem will never arise...
Abhishek Sur
-
while (cnt < dsAllUpdtblData.Tables[0].Rows.Count - 1) { if(dsAllUpdtblData.Tables[0].Rows[cnt].Item[6].ToString()=="") { } cnt = cnt + 1; } i have above code in tht ....it will give an error to Item[6] this part how i will get perticulat column?
Just use "[6]" instead of ".Item[6]".
David Anton http://www.tangiblesoftwaresolutions.com C++ to C# Converter C++ to VB Converter C++ to Java Converter VB & C# to Java Converter Java to VB & C# Converter Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: convert VB, C#, or Java to C++/CLI